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

📄 nihongdeng.htm

📁 网页颜色渐变,可实现网页中背景色的渐变效果
💻 HTM
字号:
<html>
  <head>
  <title>dhtml demo </title>
  <script language="vbscript">
  dim lifematrix(),outstring
  nox =17
  noy =51
  redim lifematrix(nox,noy)
  sub start()
  call initialize_matrix()
  call matrix_out()
  end sub

  sub wholives()
  dim tempmat()
  redim tempmat(nox,noy)
  for i=0 to nox 
   for j=0 to noy
  tempmat(i,j)=lifematrix(i,j) 
  next
  next
   for i=1 to nox-1
    for j=1 to noy-1

      nntotal =(tempmat(i-1,j-1)  +  tempmat(i,j-1) + tempmat(i+1,j-1) +
  tempmat(i-1,j) + tempmat(i+1,j) + tempmat(i-1,j+1) + tempmat(i,j+1) +
  tempmat(i+1,j+1))
      if lifematrix(i,j) =1 and (nntotal <= 1 or nntotal >= 4) then
      lifematrix(i,j) =0
      elseif lifematrix(i,j) =0 and(nntotal = 3) then
     lifematrix(i,j)=1
     elseif lifematrix(i,j)=1 and (nntotal = 3 or nntotal = 2) then
     lifematrix(i,j)=1
     end if 
next
next
call matrix_out()
end sub

sub initialize_matrix()
randomize
for i=0 to nox
  for j=0 to noy
     lifematrix(i,j)=0
  next
  next
  for i =0 to 300
    p=(int(rnd*(nox-1))+1)
    q=(int(rnd*(noy-1))+1)

    lifematrix(p,q) =1
  next
end sub

sub matrix_out()
  for i=0 to nox
   for j=0 to noy
    if lifematrix(i,j)=0 then
       outstring = outstring + "="
    else
   outstring = outstring + "n"
   end if
 next
outstring = outstring + chr(13)
next
document.all.lifestyle.innertext=outstring
outstring=""
end sub
</script>

  <style>
  <!--
    body {background:black;}
    .check{font-family:"webdings";
           color:#f0f;
           font-size:8pt;
           line-height:90%
          }
    .logo{position:absolute;
          filter:alpha(opacity=85);
          top:40px;
          left:10px;
          font-family:impact;
          font-weight:bold;
          font-size:96px;
          text-align:center;
          color:#ffffff;
         }
   .subhead{position:absolute;
            top:160px;
            left:5px;
            font-family:verdana;
            font-weight:bold;
            font-size:20px;
            font-style:italic;
            color:#ff0;
          }
    -->
</style>
<script language="javascript">

function settimer(){
setinterval("wholives()",100,"vbscript");
start();
}
</script>
</head>

<body bgcolor="#000000" onload ="settimer()">
      <div align="center" class="check" id="lifestyle"></div>
      <div align="center" class="logo">
          <p>sway's home</p>
      </div>
       <div align="center" class="subhead">
          <P> a place that you have never imagined.</p>
      </div>
</body>
</html>

⌨️ 快捷键说明

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