CINXE.COM
环保在线移动端_环保行业“互联网+”服务平台
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>环保在线移动端_环保行业“互联网+”服务平台</title> <script src="js/jquery.min.js"></script> <link rel="stylesheet" href="css/mobile.css"> </head> <body> <div id="top"> <ul> <li><a href="javascript:" class="one"><b>行业资讯</b>一键浏览</a> </li> <li><a href="javascript:" class="two"><b>产品信息</b>一键搜索</a> </li> <li><a href="javascript:" class="three"><b>企业询盘</b>一键查询</a> </li> <li><a href="javascript:" class="four"><b>商务沟通</b>一键畅聊</a> </li> </ul> </div> <div id="banner"> <div class="infomation"> <img src="images/hbzhan.png" /> </div> </div> <div class="box1"> <img src="images/hbzhan-pic1.jpg" /> </div> <div class="box-bg"> <div class="box2" id="one"> <div class="title">行业资讯随时看</div> <img src="images/hbzhan-pic2.jpg" /> </div> </div> <div class="box-bg"> <div class="box3" id="two"> <div class="title">产品信息随时搜</div> <img src="images/hbzhan-pic3.jpg" /> </div> </div> <div class="box-bg"> <div class="box4" id="three"> <div class="title">企业询盘随时查</div> <img src="images/hbzhan-pic4.jpg" /> </div> </div> <div class="box-bg"> <div class="box5" id="four"> <div class="title">商务沟通随时聊</div> <img src="images/hbzhan-pic5.jpg" /> </div> </div> <div class="box-bg box-last"> <div class="box6"> <div class="title">操作流程</div> <img src="images/hbzhan-pic6.jpg" /> </div> </div> <script language="javascript" type="text/javascript"> $("#top ul li a").click(function() { $("#top ul li a").removeClass("actived"); var eleClass = $(this).attr("class"); $(this).addClass("actived"); $(this).blur(); var nowY = $("#" + eleClass).offset().top - $("#top").height() + 12; $('body,html').animate({ scrollTop: nowY }, 500); return false; }); var aLength = $("#top ul li a").length; var topValue; var ATopValue = new Array(); for (var i = aLength; i--; i >= 0) { ATopValue[i] = new Array(); var aClass = $("#top ul li a:eq(" + i + ")").attr("class"); ATopValue[i] = $("#" + aClass).offset().top - $("#top").height() + 4; } $(window).scroll(function() { topValue = $(this).scrollTop(); $("#iphone").css({ "top": -topValue * 0.1 }); $("#word").css({ "top": topValue * 0.27 }); var id; if (topValue < ATopValue[0]) { $("#top ul li a").removeClass("actived") } else if (topValue >= ATopValue[0] && topValue < ATopValue[1]) { id = 0; } else if (topValue >= ATopValue[1] && topValue < ATopValue[2]) { id = 1; } else if (topValue >= ATopValue[2] && topValue < ATopValue[3]) { id = 2; } else if (topValue >= ATopValue[3] && topValue < ATopValue[3]) { id = 3; } else if (topValue >= ATopValue[3]) { id = 3; } $("#top ul li a").eq(id).addClass('actived').parent().siblings().children().removeClass("actived"); }) </script> </body> </html>