伪类before/after中的图片大小是不能设置的

2018-12-20  本文已影响7人  泪滴在琴上

你可以把图片设为背景图片,通过bakckground-size来设置大小

#center_box:before{
content:’’;
background-image:url(http://localhost/quding/photos/u14.png);
background-size:1000px 200px;
position: absolute;
width:1000px;
height:200px;
z-index: 100;
top: -110px;
}
上一篇下一篇

猜你喜欢

热点阅读