网页浮动点击返回网页顶部代码

直接上代码:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>点击返回网页顶部的浮动代码</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="format-detection" content="telephone=yes"/>
<meta name="msapplication-tap-highlight" content="no" />
<meta name="applicable-device" content="mobile">
<style type="text/css">
*{margin:0;padding:0}
#toubu{height:60px;background:#FF3F05;position:fixed;top:0px; width:100%;}
#dbnav{height:60px;background:#FF3F05;position:fixed;bottom:0px; width:100%;}
#zbu{margin:60px auto;background:#ddd;}
#totop{position:fixed;bottom:80px; right:10px;}
</style>
</head>
<body>
<div>
  <div id="toubu">大码女装http://www.desong.net/ </div>
  <a id="totop" href="javascript:window.scrollTo(0,0);">回到顶部</a>
  <div id="zbu"><br />1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
  <div id="dbnav">大码女装品牌http://m.desong.net/ </div>
</div>
</body>
</html>

猜你喜欢

转载自jintaozu.iteye.com/blog/2343071
今日推荐