【发布时间】:2017-01-04 18:36:55
【问题描述】:
我的 CSS 过渡在 Chrome 中无法正常工作。它在 Chrome 中会产生模糊效果,但在 Firefox 中效果很好。
这里是圆形动画的code snippet。我建议在 Chrome 中以屏幕的最大宽度查看此内容。
这是 HTML:
<button>Inflate!</button>
<div class='bubble'></div>
CSS:
.bubble {
position: relative;
left: 50px;
top: 20px;
transform: scale(1);
width: 50px;
height: 50px;
border-radius: 50%;
background-color: #C00;
transition-origin: center;
transition: all 0.5s;
overflow: hidden;
}
.bubble.animate {
transform: scale(30);
}
.bubble.ani {
transform: scale(1);
}
JavaScript (jQuery):
$('button').click(function() {
$('.bubble').addClass('animate');
});
$('.buuble').click(function() {
$(this).removeClass('animate');
$(this).addClass('ani');
});
【问题讨论】:
标签: jquery css google-chrome transform