zoukankan      html  css  js  c++  java
  • html5-相对定位

    *{
        margin: 0px;
        padding: 0px;
    }
    div{
         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;
    }*/

    天道酬勤,厚积薄发。 君子之行,静以修身,俭以养德。 非淡泊无以明志,非宁静无以致远。 如有恒,何须三更起,半夜眠;最怕莫,三天打鱼两天晒网,竹篮打水一场空。
  • 相关阅读:
    bzoj3293 分金币
    考前模板整理
    CF785D Anton and School
    容斥法解决错排问题
    CF1248F Catowice City
    CF1248E Queue in the Train
    CF1244F Chips
    CF1244C The Football Season
    Noip2016Day1T2 天天爱跑步
    Noip2015Day2T3 运输计划
  • 原文地址:https://www.cnblogs.com/houweidong/p/7612634.html
Copyright © 2011-2022 走看看