CSS背景图片定位之百分比定位

CSS背景图片的定位:

1,关键词定位:如top right bottom left center

2,像素定位:如background-position:100px 200px; 表示图片左上角定位到距离容器左上角(100px,200px)的点

3,百分比定位:如background-position:20% 50%;

百分比定位是背景图片本身(x%,y%)的点与容器左上角(x%,y%)的点重合

 

posted @ 2013-06-04 15:28  倒霉熊  阅读(660)  评论(0编辑  收藏  举报