CSS动画延迟不会触发(CSS animation delay not triggering) | 您所在的位置:网站首页 › jq延迟动画 › CSS动画延迟不会触发(CSS animation delay not triggering) |
只是好奇地知道为什么这个简单的动画延迟似乎不起作用。 我只想在元素淡入之前延迟7秒。 非常简单,但很久以来一直在寻找它。 .box1 { width: 100px; margin: 0 auto; position: relative; border: 1px solid blue; } .box2 { background: red; color: black; text-align: center; animation-delay: 7s; -webkit-animation-delay: 7s; animation: fadein 2s linear; -webkit-animation: fadein 2s linear; } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } } @-webkit-keyframes fadein { from { opacity: 0; } to { opacity: 1; } }some text Just curious to know why this simple animation delay wont seem to work. I just want a delay of 7s before the fade in of the element. Very simple im sure but been looking at it for to long now. .box1 { width: 100px; margin: 0 auto; position: relative; border: 1px solid blue; } .box2 { background: red; color: black; text-align: center; animation-delay: 7s; -webkit-animation-delay: 7s; animation: fadein 2s linear; -webkit-animation: fadein 2s linear; } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } } @-webkit-keyframes fadein { from { opacity: 0; } to { opacity: 1; } }some text |
CopyRight 2018-2019 实验室设备网 版权所有 |