.clearfix { zoom:1; } .clearfix:after { content:'.'; display:block; font-size:0; height:0; visibility:hidden; clear:both; line-height:0; } li { list-style-image:none; list-style-position:outside; list-style-type:none; } .slide { width:400px; height:250px; border:1px solid #ccc; position:relative; overflow:hidden; margin:20px auto; } .slide .b_l,.slide .b_r { width:40px; height:40px; background-color:#555; position:absolute; top:50%; margin-top:-20px; display:block; } .slide .b_l { left:10px; } .slide .b_r { right:10px; } .slide ul { height:100%; position:absolute; left:0; top:0; } .slide li { width:400px; height:100%; float:left; } .slide .dots { position:absolute; bottom:10px; left:0; width:100%; text-align:center; } .slide .dots a { display:inline-block; width:6px; height:6px; border-radius:6px; background-color:#555; margin:0 5px; } .slide .dots a.current { background-color:red; }
每一个新手都会遇到一些有banner 轮播的项目,, 一次次从网上扒,不如自己写一个轮播使用,这是一个超级超级简单的轮播插件,不如自己动手试试?