html5第七课时,固定定位

来源:互联网 发布:js和php的区别 编辑:程序博客网 时间:2024/06/14 20:14
<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title>固定定位</title>    <style>        #back{            width: 100px;            height: 100px;            text-align: center;            line-height: 100px;            background-color: yellow;            position: fixed;/*固定定位*/            bottom: 20px;            right: 10px;        }    </style></head><body><a name="top"></a><div style="height: 1000px">    <div id="back">        <a href="#top" style="text-decoration: none">返回顶部</a>    </div></div></body></html>
0 0
原创粉丝点击