zoukankan      html  css  js  c++  java
  • CSS3的chapter4

      段落样式:

      • 行高——line-height

        p { line-height:25px | 150% | normal;}

      • 段落缩进——text-indent

        p { text-indent:2em;}

      • 段落对齐——text-align

        p { text-align:left | center | right | justify;}

      • 文字间距——letter-spacing

        p { letter-spacing:5px | normal;}

      • 文字溢出——text-overflow
        text-overflow:clip ——将内容裁切掉
        text-overflow:elipsis——内容替换为省略号
             注意:要先定义强制文本在一行显示——white-space:nowrap及溢出内容为隐藏——overflow:hidden ,才有显示省略号的效果。

        p{

                 overflow: hidden;    

                 white-space: nowrap;

                 text-overflow: ellipsis;

        }

      • 段落换行——word-wrap
        word-wrapnormal | break-word

      背景样式:

      • 背景颜色——background-color
        body { background-color:#CCCCCC | rgba(255,0,0,.5) | rgb(255,0,0) | transparent;}
      • 渐变——linear-gradient/radial-gradient
        background-image:linear-gradient(to left, red 30%,blue);
      • 背景图片——background-image
        body { background-image:url(images/bg.jpg);}
      • 背景平铺方式——background-repeat
        body { background-repeat:repeat-x | repeat-y | no-repeat | repeat;}
      • 背景定位——background-position

        body { background-position:left bottom/30% 30%/20px 20px;}

      • 背景原点——background-origin
        注意:必须设置背景平铺为background-repeat:no-repeat才生效

        body {background-origin:border-box | padding-box | content-box;}

      • 背景显示区域——background-clip

        body {background-clip:border-box | padding-box | content-box | text }

      • 背景尺寸——background-size

        body { background-size:80px 60px | 80% 60% | auto | cover | contain;}

      • 缩写

        body {

                 background-color:# EDEDED;

                 background-image:url(images/bg.png);

                 background-repeat:no-repeat;

                 background-position:50%  30px;

        }

        body { background:#EDEDED url(images/bg.png) no-repeat 50% 30px;}

      列表样式:

      • 项目符号——list-style-type
        ul { list-style-type:disc | circle | square | none | decimal | lower-roman | upper-alpha;}
      • 自定义项目符号——list-style-image
        ul {list-style-image:url(images/arrow.gif)}    
  • 相关阅读:
    HDU 5115 Dire Wolf (区间DP)
    HDU 4283 You Are the One(区间DP(最优出栈顺序))
    ZOJ 3469 Food Delivery(区间DP好题)
    LightOJ 1422 Halloween Costumes(区间DP)
    POJ 1651 Multiplication Puzzle(区间DP)
    NYOJ 石子合并(一)(区间DP)
    POJ 2955 Brackets(括号匹配一)
    POJ 1141 Brackets Sequence(括号匹配二)
    ZOJ 3537 Cake(凸包+区间DP)
    Graham求凸包模板
  • 原文地址:https://www.cnblogs.com/jiangwenjie/p/5764125.html
Copyright © 2011-2022 走看看