gpt4 book ai didi

html - png旋转时隐藏滚动条

转载 作者:太空宇宙 更新时间:2023-11-04 03:46:39 25 4
gpt4 key购买 nike

我想在页面上旋转两个 png 环。一切正常,除了 Firefox 滚动条出现并上下移动。我认为这是因为方形 png 旋转和碰撞边缘。

有什么想法吗?下面的 CSS:

@-webkit-keyframes rings {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
}
}
@-moz-keyframes rings {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(359deg);
}
}
@-o-keyframes rings {
from {
-o-transform: rotate(0deg);
}
to {
-o-transform: rotate(359deg);
}
}
@keyframes rings {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}

.rotating-rings {
position: absolute;
z-index: -5;
width: 90%;
height: 90%;
overflow: none;
}

#ring-1 {
overflow: hidden;
position: absolute;
width: 90%;
-webkit-animation-name: rings;
-webkit-animation-duration: 9s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: normal;
-webkit-transition-timing-function: linear;
-moz-animation-name: rings;
-moz-animation-duration: 9s;
-moz-animation-iteration-count: infinite;
-moz-animation-direction: normal;
-moz-transition-timing-function: linear;
-o-animation-name: rings;
-o-animation-duration: 9s;
-o-animation-iteration-count: infinite;
-o-animation-direction: normal;
-o-transition-timing-function: linear;
animation-name: rings;
animation-duration: 9s;
animation-iteration-count: infinite;
animation-direction: normal;
transition-timing-function: linear;
}

#ring-2 {
overflow: hidden;
position: absolute;
width: 90%;
-webkit-animation-name: rings;
-webkit-animation-duration: 10s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: reverse;
-webkit-transition-timing-function: linear;
-moz-animation-name: rings;
-moz-animation-duration: 10s;
-moz-animation-iteration-count: infinite;
-moz-animation-direction: reverse;
-moz-transition-timing-function: linear;
-o-animation-name: rings;
-o-animation-duration: 10s;
-o-animation-iteration-count: infinite;
-o-animation-direction: reverse;
-o-transition-timing-function: linear;
animation-name: rings;
animation-duration: 10s;
animation-iteration-count: infinite;
animation-direction: reverse;
transition-timing-function: linear;
}

最佳答案

尝试为图像的父元素应用overflow:hidden

关于html - png旋转时隐藏滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24000664/

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