图像大小相同 - 按比例缩放

时间:2016-05-18 13:35:09

标签: css wordpress image

我很难搞好图像尺寸。您看到的尺寸现在适​​合,但它们没有按比例缩放。如果图像太大,你知道如何剪切图像吗?

http://vintagemaedchen.de

.post-img {
	margin-bottom:20px;
}
.post-img img {
	max-width:100%;
	height:245px !important;
}

1 个答案:

答案 0 :(得分:0)

将图像设置为背景。

Background-size: cover;
Background-position: center;
Background-repeat: no-repeat;