【发布时间】:2025-11-25 03:55:02
【问题描述】:
function popupGrowStage3() {
if (popupContentContainer.style.opacity < 1) {
popupContentContainer.style.opacity+= 0.01;
setTimeout(popupGrowStage3, 1000 / 60);
alert(popupContentContainer.style.opacity);
} else {
isPopupShowing = 1;
}
}
popupGrowStage3();
上面的代码似乎并不是每次都给不透明度增加 0.01。警报一直说 0.01。为什么要这样做?
popupContentContainer.style.width = popup.style.width;
popupContentContainer.style.height = popup.style.height;
popupContentContainer.style.backgroundColor = "#111111";
popupContentContainer.style.opacity = 0;
popup.appendChild(popupContentContainer);
这段代码在那之前
【问题讨论】:
-
只是我还是设置的间隔帖子消失了?
标签: javascript opacity