css - body 和内容的不同过渡

标签 css css-transitions transition

我环顾四周,但找不到解决方案。

如何用 body 覆盖 #wait#abouta 转换?我希望字体大小调整得更快。

谢谢。

body {
  font-family: Arial;
  font-size: 10vw
}
body {
  -webkit-transition: font .2s ease;
  -moz-transition: font .2s ease;
  -o-transition: font .2s ease;
  transition: font .2s ease;
}
#wait,
#about,
a {
  -webkit-transition: all .6s ease;
  -moz-transition: all .6s ease;
  -o-transition: all .6s ease;
  transition: all .6s ease;
}
<div id="wait">
  <div id="about">
    1 2 3 4 <a href="#">5</a> 6 7 8 9 0
  </div>
</div>

最佳答案

#wait,
#about,
a {
  -webkit-transition: all .2s ease !important;
  -moz-transition: all .2s ease !important;
  -o-transition: all .2s ease !important;
  transition: all .2s ease !important;
}

每当您想覆盖 css 且样式不适用时,请在样式代码末尾使用 !important

关于css - body 和内容的不同过渡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40546285/

相关文章:

css - 在::-webkit-scrollbar 上使用过渡?

html - 在悬停伪元素之前更改

css - 如何在CSS3中连续旋转图像?不仅在悬停时

css - Angular-material:input-group 和 md-buttons 在同一行

jquery - 如何防止最大高度过渡将页面滚动到顶部?

html - Firefox 中的生涩 CSS3 转换

css - 无法获取图像链接以使用 translate3d 悬停

HTML5 上的 CSS 布局

html - 溢出 : hidden on non floating element causes it to shrink

html - CSS3 转换 : translate on hover, 带过渡