换一批,右侧浮动导航,返回顶部,锚点
<a name="f0" id="f0"></a>
<div class="w1120"> <div class="hyp_1 cl">换一批</div> <ul class="listchange1"> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> </ul> <ul class="listchange2"> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司01</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>5000人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司01</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司01</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> </ul> <ul class="listchange3"> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司02</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>4010w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司02</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img3.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> <li> <h3><a href="#" target="_blank">深圳市南瓜子传科技有限公司02</a></h3> <dl> <dt><a href="#" target="_blank"><img src="images/img2.jpg" width="214" height="214"></a></dt> <dd> <p>员工数量<span>500人</span></p> <p>注册资本<span>400w</span></p> <p>年营业额<span>7000w</span></p> </dd> </dl> <div class="cl a_btn"> <a class="aa1" href="#" target="_blank">进入店铺</a> <a class="aa2" href="#" target="_blank">查看报告</a> </div> </li> </ul> </div>
.w1120{ width:1120px; margin:30px auto; position:relative;} .w1120 ul li{ width:334px; height:352px; background:#FFF; border-radius:10px; padding-left:26px; float:left; margin-left:10px;} .w1120 ul li h3{ font-size:18px; color:#333333; height:54px; line-height:54px; padding-top:4px; font-weight:normal;} .w1120 ul li h3 a{ text-decoration:none; color:#333333;} .w1120 ul li dl dt{ float:left; width:214px;} .w1120 ul li dl dd{ float:left; width:70px; margin-left:20px;} .w1120 ul li dl dd p{ height:46px; color:#999999; line-height:22px; padding:10px 0; border-bottom:1px #dddddd solid;} .w1120 ul li dl dd p span{ display:block; color:#666666;} .a_btn{ clear:both; padding-top:24px;} .a_btn a{ display:block; width:145px; height:34px; text-align:center; line-height:34px; float:left;} .a_btn .aa1{ background:#ee2e2d; font-size:14px; text-decoration:none; color:#FFF;} .a_btn .aa2{ border:1px #ee2e2d solid; font-size:14px; text-decoration:none; margin-left:20px; color:#ee2e2d;} .w1120 ul.listchange2{ display:none;} .w1120 ul.listchange3{ display:none;}
.left_nav1{ background:url(../images/leftbg.png) no-repeat; width:135px; height:400px; padding-left:15px; padding-top:100px; position: fixed; right:50%; bottom:100px; z-index:9999; margin-right:-720px; display:none;}
.left_nav1 ul li{ text-align:center; font-size:14px; height:35px; line-height:35px;}
.left_nav1 ul li a{ text-decoration:none; color:#FFF; width:120px; height:34px; display:block;}
.left_nav1 ul li a:hover{ background:#ff473b;}
.fh_top{ width:120px; height:34px; clear:both; cursor:pointer;}
<script> $(document).ready(function(){ $(window).scroll(function(){ if($(this).scrollTop()>500){ $(".left_nav1").css("display","block"); }else{ $(".left_nav1").css("display","none"); }; }); $(".fh_top").click(function(){ $('body,html').animate({scrollTop:0},600); return false; }); $(".left_nav1 ul li a").click(function() { $("html, body").animate({ scrollTop: $($(this).attr("href")).offset().top+ "px" }, { duration: 500, easing: "swing" }); return false; }); //代表第一次换的是第二组 var listitem = 2; //这是要换的批数 var listitemmax = 3; $(".hyp_1").click(function() { $(".listchange" + listitem).siblings("ul").css("display", "none"); $(".listchange" + listitem).css("display", "flex"); if (listitem < listitemmax) { listitem++; } else { listitem = 1; } }); }); </script>
南瓜小园 —— 从零开始,重构想象!