首页 > Web开发 > 详细

html5-相对定位

时间:2017-09-29 22:13:00      阅读:245      评论:0      收藏:0      [点我收藏+]

*{
    margin: 0px;
    padding: 0px;
}
div{
    width: 300px;
    height: 300px;
}
#div1{
    background: rgba(255,0,0,0.5);
    position: relative;
    left: 50px;
z-index: 2
}
#div2{
    background: rgba(0,255,0,0.5);
    position: relative;
    left: 150px;
    top: -100px;
    z-index: 3
    
}
#div3{
    background: rgba(0,0,255,0.5);
    position: relative;
    left: 300px;
    top: -300px;
    z-index: 1
}

/*
#div1{
    background: rgba(255,0,0,0.5);    
    position:fixed;
    left: 100px;
}
#div2{
    background: rgba(0,255,0,0.5);
    position:absolute;
    left: 200px;
}
#div3{
    background: rgba(0,0,255,0.5);
    position: absolute;
    left: 300px;
}*/

html5-相对定位

原文:http://www.cnblogs.com/houweidong/p/7612634.html

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