CSS中的background属性中的no-repeat 0px 50%是什么作用

CSS中的background是定义元素背景颜色的,那么no-repeat 0px 50%是什么作用呢

发布者:IT人在线 | 发表时间:2018/9/13 18:03:28

 no-repeat 0px 50%:

background:url("img/1.jpg") no-repeat 0px 50%;

 no-repeat :表示不重复背景图片  repeat-x、repeat-y 表示延x轴或者y轴重复 

0px:0px表示背景边距左边0 如果有其他的参数则可以对应相应的值  0px 0px表示 水平x位置为0,垂直y位置为0

50%:表示图片垂直居中

 

感谢您的阅读,希望喜欢,关注本站更多内容。