首页 > 其他 > 详细

fixed定位对其

时间:2017-02-06 00:18:39      阅读:171      评论:0      收藏:0      [点我收藏+]

fixed定位

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>fixed</title>
    <style type="text/css">
    .div1{
        position: fixed;
        left: 100%;
        top: 50%;
        margin-left: -200px;/*向左移动一个DIV的宽度就可以显示了的*/
        margin-top: -100px;
        width: 200px;
        height: 200px;
        border: 1px solid blue;
        background: pink;
        z-index: 999;
    }
    .div2{
        margin: 0 auto;
        width: 500px;
        height: 1000px;
        border: 1px solid blue;
        background: silver;

    }
    </style>
</head>
<body>
    <div class="div1">
        11111111111111111111
    </div>
    <div class="div2"></div>
</body>
</html>

 

11111111111111111111
 

fixed定位对其

原文:http://www.cnblogs.com/qianjilou/p/6368817.html

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