📜  javascript 更改 css 不透明度持续时间 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:07             🧑  作者: Mango

代码示例1
var opacity = 0;

function MyFadeFunction() {
   if (opacity<1) {
      opacity += .1;
      setTimeout(function(){MyFadeFunction()},100);
   }
   document.getElementById('about').style.opacity = opacity;
}