|
|
细看了代码,#mplayer 选择器代码有冗余不过没多大影响:
#mplayer {
position: absolute;
bottom: 30px;
width: 248px;
height: 248px;
left: 410px;
top: 105px;
background: url('https://pic.imgdb.cn/item/63e333e84757feff33d85fbb.gif') no-repeat center/cover;
border-radius: 50%;
cursor: pointer;
animation: spin 10s infinite linear;
animation-play-state: var(--state);
}
bottom 和 top 都是定义垂直方向的位置,bottom 定义在父元素底部即离底线的位置,top定义在父元素顶部即离顶线的位置。本例中,应将 bottom: 30px; 多余,去掉。又是,当 left、top、right、bottom一同使用是,是将子元素部署于父容器的四个方向的位置,不用设置宽高,若此,容易令该元素产生异常。
|
|