码迷,mamicode.com
首页 > Web开发 > 详细

精通css——background属性

时间:2018-11-08 00:20:13      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:位置   att   cli   origin   scroll   enter   背景图片   图片   round   

一:概念

1. background-color(1):规定要使用的背景的颜色

2. background-position(1):规定背景图片的位置

  top left

  top center

  top right

  center left

  center center

  center right

  bottom left

  bottom center

  bottom right

  ------------------

  x% y%

  ------------------

  xpos ypos

3. background-size(3):规定背景图片的尺寸

  length

  ------------------

  percentage

  ------------------

  cover

  ------------------

  contain

4. background-repeat(1):规定如何重复背景图片

  repeat

  repeat-x

  repeat-y

  no-repeat

  inherit

5. background-origin(3):规定背景图片的定位区域

  *padding-box

  border-box

  content-box

6. background-clip(3):规定背景的绘制区域

  *border-box

  padding-box

  content-box

7. background-attachment(1):规定背景是否固定或者随着页面的其他部分滚动

  *scroll

  fixed

  inherit

8. background-image(1):规定要使用的背景图片

二:使用

精通css——background属性

标签:位置   att   cli   origin   scroll   enter   背景图片   图片   round   

原文地址:https://www.cnblogs.com/happylich/p/9926457.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!