HTML:
<div class="logo-container">
<span>some text</span>
</div>
CSS:
.logo-container {
display: block;
background: url(img/logo.png) no-repeat center;
background-size: contain;
width:100%;
height:20%;
}
如何获得背景图像缩放到的当前尺寸?
我假设背景图像尺寸不同于.logo-container
.