background使用

background-position 有两个参数,定义背景图片起始位置可选值有:

center top left right bottom px %

 

background-size 可以用 px % 设定其宽高 

值 cover 完全覆盖背景区域    contain 适应背景区域

 

background-origin 背景图片可以放置于 content-box、padding-box 或 border-box 区域。

 

background-clip 将背景图片裁剪至 content-box、padding-box 或 border-box 区域。

参阅 http://www.w3school.com.cn/cssref/pr_background.asp

posted @ 2018-02-01 15:35  webyun  阅读(272)  评论(0编辑  收藏  举报