0
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);

このコードはその前です

4

1 に答える 1