Подробное описание и демонстрация работы блока «Новостной слайдер» для сайта под номером №33 для библиотеки Bootstrap. Html и CSS код для новостного слайдера на сайте как на изображении.
.demo{ background: linear-gradient(to right,#ffcccc,#d3d3d3); } .post-slide{ margin: 0 15px; } .post-slide .post-img{ overflow: hidden; } .post-slide .post-img img{ width: 100%; height: auto; transform: scale(1); transition: all 1s ease-in-out 0s; } .post-slide:hover .post-img img{ transform: scale(1.08); } .post-slide .post-content{ background: #fff; padding: 20px; } .post-slide .post-title{ font-size: 17px; font-weight: 600; margin-top: 0; text-transform: capitalize; } .post-slide .post-title a{ display: inline-block; color: #808080; transition: all 0.3s ease 0s; } .post-slide .post-title a:hover{ color: #3d3030; text-decoration: none; } .post-slide .post-description{ font-size: 15px; color: #676767; line-height: 24px; margin-bottom: 14px; } .post-slide .post-bar{ padding: 0; margin-bottom: 15px; list-style: none; } .post-slide .post-bar li{ color: #676767; padding: 2px 0; } .post-slide .post-bar li i{ margin-right: 5px; } .post-slide .post-bar li a{ display: inline-block; font-size: 12px; color: #808080; transition: all 0.3s ease 0s; } .post-slide .post-bar li a:after{ content: ","; } .post-slide .post-bar li a:last-child:after{ content: ""; } .post-slide .post-bar li a:hover{ color: #3d3030; text-decoration: none; } .post-slide .read-more{ display: inline-block; padding: 10px 15px; font-size: 14px; font-weight: bold; color: #fff; background: #e7989a; border-bottom-right-radius: 10px; text-transform: capitalize; transition: all 0.30s linear; } .post-slide .read-more:hover{ background: #333; text-decoration: none; }
$(document).ready(function() { $("#news-slider").owlCarousel({ items:3, itemsDesktop:[1199,2], itemsDesktopSmall:[980,2], itemsMobile:[600,1], pagination:false, navigationText:false, autoPlay:true }); });