css中background:url(img/icon-list.gif) no-repeat 4px 12px;4和12分别是什么意思

如题所述

这个是对你的背景图片定位,4px是水平方向距左4个像素;12px是垂直方向距顶12个像素!!!
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-01-17
background:url(img/icon-list.gif) no-repeat 4px 12px;
这是一个简写的
原是:
background-image:url(img/icon-list.gif);
background-repeat:no-repeat;
background-position:4px 12px;
你说的意思是图片定位
left = 4px
top = 12px本回答被网友采纳
第2个回答  2012-01-17
背景图片定位,4px是水平方向距左像素;12px是垂直方向距顶像素 background-position
第3个回答  2012-01-17
意思是背景的定位 4PX是从左边算起4个像素,12PX是从上面算起12个像素单位
相似回答