ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
响应式Slider实例1: ~~~ <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>响应式Slider</title> <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.min.css"> <script src="assets/modernizr.js"></script> <style> body{background-color: #00CCFF} .vmcarousel-normal h4{margin:10px 15px;} .vmc-container{position: relative;} .vmc-viewport{overflow: hidden;} .vmcarousel{list-style-type: none; padding: 0; margin: 0; width: 1000%;} .vmcarousel:after{content: ''; display: table; clear: both;} .vmcarousel > li{float: left;} .vmcarousel > li img{ display: block; margin: 0 auto; max-width: 100%; width: 200px; height:150px;} .vmc-container.hide-controls .vmc-arrow-left, .vmc-container.hide-controls .vmc-arrow-right{display: none;} .vmc-arrow-left, .vmc-arrow-right{ position: absolute; top: 35%; left: -15px; width: 50px; height: 50px; margin-top: -25px; overflow: hidden; opacity: 1; border-radius: 50%; transition: opacity 0.3s ease; text-align: center; } .vmc-arrow-right{left: auto; right: -15px;} .vmc-container:hover .vmc-arrow-left, .vmc-container:hover .vmc-arrow-right{opacity: 1;} .vmc-arrow-left:after, .vmc-arrow-right:after{ content: ''; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: 400; line-height: 1; -webkit-font-smoothing: antialiased; font-size: 30px; line-height: 50px; color: white; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-shadow: 2px 2px #000; } .vmc-arrow-left:hover:after, .vmc-arrow-right:hover:after{color: white;} .vmc-arrow-left:after{content: "\e079";} .vmc-arrow-right:after{content: "\e080";} .vmc-container img[src$=".svg"]{width: 100% !important; height: auto !important; max-height: 100%;} .notransition{-webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; -ms-transition: none !important; transition: none !important;} @media (max-width: 768px) { .vmcarousel-normal{width: 100%;height: 230px;overflow: hidden;} .vmcarousel > li{float: left;margin:10px 10px 30px 10px;} } </style> </head> <body> <div class="container"> <center><h2>响应式Slider</h2></center> <ul class="vmcarousel-normal"> <li><a href="#"> <img src="images/1.jpg" alt="" width="200"> <h4>文章标题1</h4> </a></li> <li><a href="#"> <img src="images/2.jpg" alt="" width="200"> <h4>文章标题2</h4> </a></li> <li><a href="#"> <img src="images/3.jpg" alt="" width="200"> <h4>文章标题3</h4> </a></li> <li><a href="#"> <img src="images/4.jpg" alt="" width="200"> <h4>文章标题4</h4> </a></li> <li><a href="#"> <img src="images/5.jpg" alt="" width="200"> <h4>文章标题5</h4> </a></li> <li><a href="#"> <img src="images/6.jpg" alt="" width="200"> <h4>文章标题6</h4> </a></li> </ul> </div> <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script src="http://apps.bdimg.com/libs/bootstrap/3.3.4/js/bootstrap.min.js"></script> <script src="assets/jquery.vm-carousel.js"></script> <script> jQuery(function($){ $('.vmcarousel-normal').vmcarousel({ centered: false, start_item: 0, autoplay: false, infinite: false }); }); </script> </body> </html> ~~~ 效果图: ![](https://box.kancloud.cn/f3fb1e611b6163eea3fde18b1aed7f7a_799x232.jpg) 源码下载: 链接:https://pan.baidu.com/s/1kURY175 密码:zdp9