【发布时间】:2015-03-01 21:13:01
【问题描述】:
我对 Chrome 中的 SVG 背景过渡问题有疑问。它在 Firefox、Safari 和 Internet Explorer 中运行良好且流畅,但在 Chrome 中却不行。当我悬停按钮时,它首先显示更大的 SVG,然后降级到所需的大小。它在除 Chrome 之外的所有其他浏览器中运行流畅。
请检查:
.button {
background: rgba(0, 0, 0, 0.6)
url('https://cdn.mediacru.sh/b/bnN8POn3lz8M.svg')
top left no-repeat;
background-position: center;
background-size: 100% !important;
width: 200px;
height: 200px;
display: block;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.button:hover {
background: rgba(0, 0, 0, 0.9)
url('https://cdn.mediacru.sh/y/ypwpa6pIMXdX.svg')
top left no-repeat;
}
<a class="button" href="#"></a>
【问题讨论】:
标签: html google-chrome svg background-image css-transitions