background:url(../images/list01.png) no-repeat 0 center;是什么意思background:url(../images/list01.png) no-repeat 0 center;background:url(../images/bg.png) no-repeat -4px -3px;这里面的后面两个值是什么意思0 center和 -4px -3px?
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/01 06:57:09
![background:url(../images/list01.png) no-repeat 0 center;是什么意思background:url(../images/list01.png) no-repeat 0 center;background:url(../images/bg.png) no-repeat -4px -3px;这里面的后面两个值是什么意思0 center和 -4px -3px?](/uploads/image/z/9717538-58-8.jpg?t=background%3Aurl%28..%2Fimages%2Flist01.png%29+no-repeat+0+center%3B%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9Dbackground%3Aurl%28..%2Fimages%2Flist01.png%29+no-repeat+0+center%3Bbackground%3Aurl%28..%2Fimages%2Fbg.png%29+no-repeat+-4px+-3px%3B%E8%BF%99%E9%87%8C%E9%9D%A2%E7%9A%84%E5%90%8E%E9%9D%A2%E4%B8%A4%E4%B8%AA%E5%80%BC%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D0+center%E5%92%8C+-4px+-3px%3F)
background:url(../images/list01.png) no-repeat 0 center;是什么意思background:url(../images/list01.png) no-repeat 0 center;background:url(../images/bg.png) no-repeat -4px -3px;这里面的后面两个值是什么意思0 center和 -4px -3px?
background:url(../images/list01.png) no-repeat 0 center;是什么意思
background:url(../images/list01.png) no-repeat 0 center;
background:url(../images/bg.png) no-repeat -4px -3px;
这里面的后面两个值是什么意思0 center和 -4px -3px?
background:url(../images/list01.png) no-repeat 0 center;是什么意思background:url(../images/list01.png) no-repeat 0 center;background:url(../images/bg.png) no-repeat -4px -3px;这里面的后面两个值是什么意思0 center和 -4px -3px?
background:url(../images/list01.png) no-repeat 0 center;
的意思是 图像地址 不重复 水平位置0 垂直位置居中
0 center 的意思就是 水平位置0 垂直位置居中
-4px -3px 的意思就是 水平位置-4px 垂直位置-3px
这两个值和background-position 属性是一样的,即设置背景图像的起始位置.
这个属性设置背景原图像的位置,背景图像如果要重复,将从这一点开始.
默认值:0% 0%
可能的值
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right (以上,如果您仅规定了一个关键词,那么第二个值将是"center".)
x% y% ( 第一个值是水平位置,第二个值是垂直位置.左上角是 0% 0%.右下角是 100% 100%.如果您仅规定了一个值,另一个值将是 50%.)
mpx npx (第一个值是水平位置,第二个值是垂直位置.左上角是 0 0.单位是像素 (0px 0px) 或任何其他的 CSS 单位.如果您仅规定了一个值,另一个值将是50%.)
您可以混合使用 % 和 position 值.