我的svg中有一个图像,我想使用css在鼠标悬停时缩放该图像。
这是我的svg文档。
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1260 720" width="1260px" height="740px" preserveAspectRatio="xMinYMin meet">
<g>
<g id="step-5">
<image overflow="visible" class="step-circle-5" width="173" height="173"
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK0AAACsCAYAAAAJ8yzmAAA
ACXBIWXMAAAkSAAAJEgFGxru7AAAA.. transform="matrix(0.9334 0 0 0.9389 843.2724 402.5272)"></image>
<text transform="matrix(1.0004 0 0 1 825.4094 649.0767)" fill="#A9D48D" font-size="92">5</text>
</g>
....
</g>
</svg>这是css
.step-circle-5:hover{
transform: translate(843.2724 402.5272) scale(1.2) translate(843.2724 402.5272);
-webkit-transform: translate(843.2724 402.5272) scale(1.2) translate(843.2724 402.5272);
}这里是 码页的完整代码
发布于 2017-06-03 11:14:31
我认为你的选择是错误的,试试这个:
/* .step-circle-1 is last <image> tag in svg document */
svg .step-circle-1:hover{
cursor:pointer;
transform: scale(1.2)
translate(5%,50%);
}翻译的时候你必须弹一点..。
https://stackoverflow.com/questions/44339669
复制相似问题