【问题标题】:Images same size - scaling proportional相同大小的图像 - 按比例缩放
【发布时间】:2016-09-15 00:54:24
【问题描述】:

我无法很好地调整图像大小。您现在看到的大小适合,但它们不是按比例缩放的。如果图片太大,你知道怎么剪吗?

http://vintagemaedchen.de

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

【问题讨论】:

    标签: css wordpress image


    【解决方案1】:

    将图像设置为背景。

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

    【讨论】:

    • 对不起,忘了说它是 WordPress 网站:Http://vintagemaedchen.de 不能将其设置为背景
    • 您可以获取缩略图网址并将其用作背景的内联样式。
    猜你喜欢
    • 1970-01-01
    • 2012-08-29
    • 2011-06-03
    • 1970-01-01
    • 2015-11-28
    • 2018-06-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多