zoukankan      html  css  js  c++  java
  • position属性的问题

    position属性

    使用情况:
    1.块级元素相对于浏览器的位置
       ——只需要设置块级元素本身的 position:abosolute,并设置其top、left等属性
        <style>
            #father {border:1px #cccccc solid; 200px; height:300px; }
            #son {border-top:1px #FF5809 solid; background:#f2f6fb; 100%; height:30px; position:absolute; bottom:30px; left:0px; }
        </style>
    2.块级元素相对于其父级元素的位置
       ——需要设置父级元素的position:relative,块级元素本身的 position:abosolute,并设置其top、left等属性
        <style>
            #father {border:1px #cccccc solid; 200px; height:300px; position:relative; }
            #son {border-top:1px #FF5809 solid; background:#f2f6fb; 100%; height:30px; position:absolute; bottom:30px; left:0px; }
        </style>


     

  • 相关阅读:
    DataFrame转矩阵Np-Array
    十月15
    十月14
    十月14
    十月12
    十月10
    2016-02-22 有无网络 2
    2016-02-22 有无网络的提示 1 h m
    2016-02-20 web view
    20160220 下拉刷新 上拉加载
  • 原文地址:https://www.cnblogs.com/hamfy/p/3106002.html
Copyright © 2011-2022 走看看