欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!

 

background:

  background-color:背景颜色

  background-image:背景图片

  background-repeat:背景重复

  background-position:背景定位

  background-attachment:背景固定/fixed)

background-size  背景尺寸

  background-size:x y

  background-size:100% 100%

  background-size:cover 比例放大

 background-size:contain 包含(图片不溢出)

多背景

       background:url() 0 0,url() 0 100%;

background-origin  背景区域定位

       border-box border区域开始显示背景。

   padding-box padding区域开始显示背景。

   content-box content内容区域开始显示背景。

background-clip   背景绘制区域

   border-box border区域向外裁剪背景。

   padding-box padding区域向外裁剪背景。

   content-box content区域向外裁剪背景。

   text:背景填充文本// 支持的

   no-clip border区域向外裁剪背景。

颜色渐变

       线性渐变:-webkit-linear-gradient(起点/角度,颜色 位置,...,)

      起点:left/top/right/bottom/left top...... 默认top

      角度:逆时针方向 0-360

      颜色 位置:red 0, blue 50%,yellow 100%(红色从50%渐变到100%为蓝色)

颜色渐变

repeating-linear-gradient  线性渐变重复平铺

       IE低版本渐变(滤镜)

  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#ff0000',GradientType='1');

颜色渐变

       径向渐变:radial-gradient(起点(圆心位置), 形状/半径/大小,颜色1,颜色2)

      起点:left/top/right/bottom或具体值/百分比

      形状:ellipse(椭圆)circle(正圆)

        大小:具体数值或百分比,也可以是关键字(closest-side(最近端), closest-corner(最近角), farthest-side(最远端), farthest-corner(最远角), contain(包含) ,cover(覆盖);

:firefox目前只支持关键字

 

 

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c14445.shtml