vue ,background属性的使用
在做一个移动端项目时,需要用加一个圆形的背景,
UI给到我图的时候, 我使用了background: url(’ 图片地址’) no-repeat ; 这样的写法
但是,在测试时,发现这个背景的圆,只有一半,另一半消失了。
这是什么情况呢?
后来才发现 , background 属性, 是一个简写的形式, background : url(’ 图片地址’) no-repeat center center ;
在最后加上两个 位置 center center , 就实现了。
发布者:admin,转转请注明出处:http://www.yc00.com/news/1706274853a1449201.html
评论列表(0条)