首页 > 其他 > 详细

锚点、绝对定位---回到顶部

时间:2016-11-14 12:18:04      阅读:179      评论:0      收藏:0      [点我收藏+]
 <html>
<head>
  <meta charset="utf-8">
  <title>锚点、绝对定位---回到顶部</title>
<style>
/*position:fixed;绝对定位*/
#image2{
margin-left:90%;
margin-top:35%;
position:fixed;
}
/* 只是纯粹的设置背景图片位置而已
body{
    background-image:url(./111.jpg);
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:100% 50%;
}
*/
</style>  
</head>
<body>
<a name="top">顶部</a>

<div id="image2">
    <a href="#top">
        <img src="./111.jpg" alt="111"/> 
    </a>
</div>

<table width="100px" height="500px" border="1" cellspacing="0" cellpadding="5px">
    <tr><td>111</td></tr>
</table>
<hr/>
<table width="100px" height="500px" border="1" cellspacing="0" cellpadding="5px">
    <tr><td>222</td></tr>
</table>
</body>
</html>

 

锚点、绝对定位---回到顶部

原文:http://www.cnblogs.com/1020182600HENG/p/6060939.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!