【发布时间】:2017-01-18 00:16:09
【问题描述】:
拉伸png背景图片很容易:
.stretched-logo-bg {
background: url("../img/curve.png") center center no-repeat;
background-size: 100% 100%;
}
这不适用于 SVG 背景
.stretched-logo-bg {
background: url("../img/curve.svg") center center no-repeat;
background-size: 100% 100%;
}
它不会被拉伸,它会保持它的纵横比并且只是居中。
至少在 Chrome 52 中
【问题讨论】:
-
罗伯特你能做到吗?规范中在哪里引用?很想阅读详细信息
-
@MichaelMullany 我的回答包含指向规范部分的链接
标签: css svg background-image