gpt4 book ai didi

html - 延迟按钮动画 CSS

转载 作者:行者123 更新时间:2023-12-05 09:13:54 24 4
gpt4 key购买 nike

<分区>

我希望在打字动画完成后显示“输入”按钮。如果我在动画前设置display:none,即使动画完成后它也不会显示。我认为问题出在“@keyframe clickit”,但我不知道它是什么。

@import url(https://fonts.googleapis.com/css?family=Teko);
body{
margin: 0;
padding: 0;
background-color: #3c3f41;
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.exec h2{
color: #fff;
font-family: 'Teko', sans-serif;
font-weight: lighter;
overflow: hidden;
border-right: 2px solid orange;
padding-right: 5px;
white-space: nowrap;
margin: 0 auto;
animation:
typing 1s steps(20, end),
cursor 0.5s step-end infinite;
/*animation-delay: 5s;*/
}
@keyframes typing {
from{ width: 0 }
to{ width: 100% }
}
@keyframes cursor{
from, to {
border-color: transparent;}
50% {
border-color: orange;
}
}
.enter{
border: 1px solid transparent;
border-radius: 15px;
min-width: 70px;
background-color: orange;
color: white;
font-size: 16px;
/*display: none;*/
animation-name: clickit;
animation-delay: 1s;

}
@keyframes clickit {
from {display: none;}
to {display: block}
}
<body>
<div class="exec">
<h2>
execute portfolio;
</h2>
</div>
<button class="enter">enter</button>
</body>

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com