首页 > Web开发 > 详细

CSS-Position

时间:2018-04-20 15:09:56      阅读:182      评论:0      收藏:0      [点我收藏+]

.test1 {
    color:white;
    height: 50px;
    line-height: 50px;
    background:black;
}
.test2 { --------------------------在文档流浮动起来,块级自动沾满行取消,宽度自适应内容,视同行内元素,紧跟着兄弟元素,相对位置不变,后面的元素会前移动
    position: absolute;
    height: 50px;
    line-height: 50px;
    background:red;
    clip: rect(0 auto 40px 10px); ------剪切是相对于元素左上角0,0
}
.test3 {
    color:white;
    height: 50px;
    line-height: 50px;
    background:black;
}

CSS-Position

原文:https://www.cnblogs.com/justart/p/8890862.html

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