【发布时间】:2021-07-30 15:03:59
【问题描述】:
我制作了一个包含简单动画弹跳的类弹出窗口。html 部分如下:-
那么如何防止popup中的动画进入id open-btn CSS 是这样的:-
.slanted {
margin-left: 440px;
/* transform: skewX(25deg); */
color: yellowgreen;
font-size: 54px;
/* margin-top: 16px; */
overflow: visible;
animation-name: bounce;
animation-duration: 2s;
animation-iteration-count: infinite;
}
@keyframes bounce {
from {
margin-top: 0px;
}
to {
margin-top: 16px;
}
}
#open-btn {
color: rgb(0, 0, 0);
font-weight: bolder;
font-size: 32px;
background-color: rgb(47, 47, 236);
width: 270px;
height: 80px;
margin-top: 350px;
margin-left: 520px;
text-align: center;
padding: 16px;
cursor: pointer;
}
<div class="popup">
<div class="slanted">
I am Veer Shah
</div>
</div>
<div id="open-btn">Download CV</div>
【问题讨论】: