zoukankan      html  css  js  c++  java
  • 9.29 h5日记

    1、CSS中哪些属性可以继承?

    font系列 text系列 color line-height

    2、border-radius的值

    值的顺序是左上 右上 右下 左下

    则 border-radius:5px 5 px 5px 0;

    3、white-space 规定段落中的文本换不换行 

    white-space:norwap;不换行

    4、word-wrap 可以允许长的内容自动换行

    word-wrap:break-word;默认值是不允许换行 

    5、如何写出三角形

    宽高必须是0

    div{0;

      height:0;

      border-top:5px solid transparent;

      border-right:5px solid transparent;

      border-bottom:5px solid blue;

      border-left:5px solid transparent;

    }

    6/margin对布局的影响

    (两种常见的margin排版方式

    双飞翼布局:中间固定,两边auto

    圣杯布局:中间auto,两边固定

    margin是给元素设置外边距属性值是数字,可正,可负

    当margin值为正时,正常往上下左右偏移

    当margin值为负时,margin-left会向左偏移

                                     margin-top会想向上偏移

                                    margin-right,当前元素不动,后面的元素会向左偏移,并覆盖当前元素

                                  margin-bottom,当前元素不动后面的元素会向上走

    PS:当margin为负的值的时候,实际上是增大了当前元素的宽,且当前元素没有设置宽

    ❤:在float和position的布局中,margin为负值时的影响

    (1)float:

              margin-left会向左偏移

                                     margin-top会想向上偏移

                                    margin-right,当前元素不动,后面的元素会向左偏移,并覆盖当前元素

                                  margin-bottom,当前元素不动后面的元素会向上走

    (2)position:absolute;是为了让一个元素居中

    div{

      position:absolute;

      left:50%;

      top:50%;

      margin-left:-1/2 width;

      margin-top:-1/2 height;

    }

    总结 :margin为负值时,无论在什么条件下都是在释放自己的空间,如果自己的margin不够,就会贡献出自己的宽高

  • 相关阅读:
    HDU 5828 Rikka with Sequence (线段树+剪枝优化)
    Educational Codeforces Round 5 E. Sum of Remainders (思维题)
    HDU 2256 Problem of Precision (矩阵快速幂)
    Codeforces 597C. Subsequences (树状数组+dp)
    Codeforces Round #292 (Div. 1) B. Drazil and Tiles (类似拓扑)
    HDU 5794 A Simple Chess (Lucas + dp)
    Codeforces Round #365 (Div. 2) D. Mishka and Interesting sum (离线树状数组+前缀xor)
    Codeforces Round #313 (Div. 2) E. Gerald and Giant Chess (Lucas + dp)
    进程内存空间的分布
    快排,堆排与归并排序
  • 原文地址:https://www.cnblogs.com/qinlinkun/p/9765436.html
Copyright © 2011-2022 走看看