⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 djs.htm

📁 CSS样式表的入门教程,内容详尽,值得参考,CSS网页特效
💻 HTM
字号:
<html>
  <head>
    <title>  css djs </title>
    <script defer>
       function InitializePage()
       {
        BuildColorTable();
       }
    </script>
  </head>

  <body onload="InitializePage()">
     <div id ="div1"
          style="position:absolute;top:20;left:20;
                width:100;height:100;font-size:100;text-align:center;
                background-color:red;
                filter:revealtrans(transition=23,duration=.01)"
                onclick="Count()"
                onfilterchange="Repeat()">
    </div>
    <div style="position:absolute;top:130;left:20">
      <dd><br>
          单击这个方块看倒计时的效果
          <br>点击刷新之后会以不同的方式进入倒计时。
      </dd>
    </div>

    <p> <br>
    <script>
       <!--
         var iMaxTransition=23;
         var iTransNumber=iMaxTransition;
         var speed=2.5;
         var fRunning=0;
         var speedDirection=0;
         var g_aColors= new Array(24);
         
         function ColorPair(sColor,sBGColor)
         {
          this.m_color=sColor;
          this.m_bgcolor=sBGColor;
         }
    
         function BuildColorTable()
         {
          g_aColors[0]=new ColorPair('#000000','#ffffff');
          g_aColors[1]=new ColorPair('#305b60','#1174c0');
          g_aColors[2]=new ColorPair('#033450','#10a9a0');
          g_aColors[3]=new ColorPair('#030d40','#0fde80');
          g_aColors[4]=new ColorPair('#02e630','#0f1360');
          g_aColors[5]=new ColorPair('#02bf20','#0e4840');
          g_aColors[6]=new ColorPair('#029810','#0d7d20');
          g_aColors[7]=new ColorPair('#027100','#0cb200');
          g_aColors[8]=new ColorPair('#0249f0','#0be6e0');
          g_aColors[9]=new ColorPair('#0222e0','#ff0000');
          g_aColors[10]=new ColorPair('#01fbd0','#0a50a0');
          g_aColors[11]=new ColorPair('#01d4c0','#098580');
          g_aColors[12]=new ColorPair('#01adb0','#08ba60');
          g_aColors[13]=new ColorPair('#0186a0','#07ef40');
          g_aColors[14]=new ColorPair('#015f90','#072420');
          g_aColors[15]=new ColorPair('#013880','#065900');
          g_aColors[16]=new ColorPair('#011170','#058de0');
          g_aColors[17]=new ColorPair('#00ea60','#04c2c0');
          g_aColors[18]=new ColorPair('#00c350','#03f7a0');
          g_aColors[19]=new ColorPair('#009c40','#032c80');
          g_aColors[20]=new ColorPair('#007530','#026160');
          g_aColors[21]=new ColorPair('#004e20','#019640');
          g_aColors[22]=new ColorPair('#002710','#00cb20');
          g_aColors[23]=new ColorPair('#038270','#123fe0');
         }
 
         function Repeat()
         {
           fRunning=0;
           Count();
         }
 
         function Count()
         {
          if (fRunning==0)
          {
           fRunning=1;
           div1.filters[0].transition=iTransNumber;
           div1.filters[0].Apply();
           div1.innerText=iTransNumber;
           if (iTransNumber<=g_aColors.length)
           {
             div1.style.backgroundColor=g_aColors[iTransNumber].m_bgColor;
                  div1.style.color=g_aColors[iTransNumber].m_color;
           }

           div1.filters[0].play(speed);

           if (iTransNumber==0)
           {
              iTransNumber=iMaxTransition;
              return;
           }
           iTransNumber--;

           if (speed>.1)
           {
             speed=0.1;
           }
          }
         }
     -->
        </script>
         </p>
        </body>
        </html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -