【发布时间】:2018-01-20 22:25:09
【问题描述】:
我在 Safari 中遇到了过渡效果的问题,需要一些帮助。我的 CSS 悬停交换背景图像,因为它应该,但是悬停图像从它的位置向上和向左“跳跃”(我不想发生这种情况)。谢谢。
结构:
.sidebar .widget {
height: 276px;
width: 326px;
background:url('/wp-content/themes/a-theme/svg/polygon-image.svg') no-repeat center center;
background-size: 100%;
}
.sidebar .widget:hover {
background:url('/wp-content/themes/a-theme/svg/polygon-image-hover.svg') no-repeat center center;
background-size: 100%;
transition: 0.5s ease-in-out;
}
<div class="sidebar">
<aside id="black-studio-tinymce-18" class="widget widget_black_studio_tinymce">
<div class="textwidget">
<h3 style="text-align: center;">Sample Text<br></h3>
</div>
</aside>
</div>
【问题讨论】:
-
我可以看看你的图片吗?
标签: css safari transition