【发布时间】:2015-08-05 08:59:04
【问题描述】:
我有 3 个元素正在使用 CSS 过渡在 :hover 上增长。其中两个工作正常,但最后一个在 Firefox 中闪烁,但在 Chrome 和 IE 中工作。所以问题只存在于 Firefox 中。
CSS:
.contact{
width: 300px;
height: 250px;
margin: 10px;
margin-top: 37px;
float: right;
background-color: #eca83b;
border-radius: 10%;
transition: 0.5s;
}
.contact:hover{
width: 320px;
margin: 0px;
margin-top: 27px;
height: 260px;
}
HTML:
<section class="contact">
<svg>
</svg>
<h2 class="item">Contact</h2>
</section>
什么会导致这个问题?
【问题讨论】:
-
我没有看到任何闪烁
-
最好定义你正在转换的 wat:
transition: all 0.5s;,transition: width 0.5s, height 0.5s;,在这里阅读你可以定义的内容:w3.org/TR/css3-transitions/#animatable-properties
标签: html css firefox css-transitions