1
如何从CSS缩放我设置宽度和高度的图像。目前,它看起来非常紧张。 这是我在我的HTML那样:从CSS的图像比例
<div id="notification-media" *ngIf="notification.type < 200">
<img src="{{notification.video.thumbnail}}" id="notification-video-image"/>
</div>
在我的CSS文件:
#notification-video-image{
width: 96px;
height:54px;
margin-top: 30px;
}
#notification-media{
width: 30%;
float: right;
margin-right: 18px;
}
我,也试图设置background-size:cover
和width:100%; , height:100%;
,但它并没有开车送我到预期的结果。