如果在<div>
的内部如何“模仿”background-size:cover;
(请参阅http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-size&preval=cover)与<img>
标记的行为。我想有结构是这样的:background-size:cover equivalent
<div style="width:100%, height=30%">
<img ng-src="{{data.imageData}}"/>
</div>
对不起,如果我不是的话题很清楚,我不知道,如何把它更加清晰。
有关添加'IMG {宽度什么:100%; height:auto;}' – Chris
其中之一取决于图像及其容器的宽高比:'{width:100%; height:auto}'或'{width:auto;身高:100%}' –