今天写项目,无论background-size 怎么设置背景图片都不能占据100%。最后发现原来background-size写在背景图片引入之前无效。
.newBottom {
width: 100%;
height: 28%;
display: flex;
flex-direction: row;
border-top: 1px solid #18cd7e;
background: url('../../../assets/中上边框.png') no-repeat;
background-size: 100% 100%;//写在引入图片之上无效
}