代码改变世界

【备忘】とある画像の自动生成

2011-01-13 16:59  Nana's Lich  阅读(570)  评论(0编辑  收藏  举报

好吧,这是 IE Only 的版本,我是用在一个 MSHTA 工具里面的。

<html>
<head>
  <title>Untitled Page</title>
</head>
<body>
  <div style="position: relative;">
    <div id="divArtText" style="position: absolute; color: Red; font-family: MS PMincho;
      font-weight: bold; background-repeat: no-repeat; width: 400px; height: 200px; top: 0px;
      left: 0px; filter: progid:DXImageTransform.Microsoft.Alpha( style=1,opacity=100,finishOpacity=10,startX=0,finishX=25,startY=100,finishY=0);
      z-index: -10">
      <div id="divVoidCont">
        <div style="position: absolute; left: 44px; top: 23px; font-size: 82px;">
          と
        </div>
        <div style="position: absolute; left: 95px; top: 48px; font-size: 54px;">
          あ
        </div>
        <div style="position: absolute; left: 132px; top: 41px; font-size: 37px;">
          る
        </div>
        <div style="position: absolute; left: 154px; top: 29px; font-size: 74px;">
          画
        </div>
        <div style="position: absolute; left: 220px; top: 41px; font-size: 61px;">
          像
        </div>
        <div style="position: absolute; left: 275px; top: 38px; font-size: 66px;">
          の
        </div>
        <div id="divJi" style="position: absolute; left: 69px; top: 106px; font-size: 69px;
          filter: progid:DXImageTransform.Microsoft.Compositor(function=6);">
          <div style="width: 69px; height: 69px; background-color: Red;">
          </div>
        </div>
        <div id="divJiRep" style="display: none;">
          自
        </div>
        <div style="position: absolute; left: 141px; top: 106px; font-size: 61px;">
          動
        </div>
        <div style="position: absolute; left: 190px; top: 98px; font-size: 73px;">
          生
        </div>
        <div style="position: absolute; left: 249px; top: 97px; font-size: 88px;">
          成
        </div>
      </div>
    </div>
    <div id="div1" style="position: absolute; color: Blue; font-family: MS PMincho; font-weight: bold;
      color: Orange; background-repeat: no-repeat; width: 400px; height: 200px; top: 0px;
      left: 0px; z-index: -11;">
      <div style="position: absolute; left: 44px; top: 23px; font-size: 82px;">
        と
      </div>
      <div style="position: absolute; left: 95px; top: 48px; font-size: 54px;">
        あ
      </div>
      <div style="position: absolute; left: 132px; top: 41px; font-size: 37px;">
        る
      </div>
      <div style="position: absolute; left: 154px; top: 29px; font-size: 74px;">
        画
      </div>
      <div style="position: absolute; left: 220px; top: 41px; font-size: 61px;">
        像
      </div>
      <div style="position: absolute; left: 275px; top: 38px; font-size: 66px;">
        の
      </div>
      <div id="divJi2" style="position: absolute; left: 69px; top: 106px; font-size: 69px;
        filter: progid:DXImageTransform.Microsoft.Compositor(function=6);">
        <div style="width: 69px; height: 69px; background-color: Orange;">
        </div>
      </div>
      <div id="divJiRep2" style="display: none;">
        自
      </div>
      <div style="position: absolute; left: 141px; top: 106px; font-size: 61px;">
        動
      </div>
      <div style="position: absolute; left: 190px; top: 98px; font-size: 73px;">
        生
      </div>
      <div style="position: absolute; left: 249px; top: 97px; font-size: 88px;">
        成
      </div>
    </div>
  </div>
  <script language="jscript">

    divJi.filters.item(0).Apply();
    divJi.innerHTML = divJiRep.innerHTML;
    divJi.filters.item(0).Play();

    divJi2.filters.item(0).Apply();
    divJi2.innerHTML = divJiRep2.innerHTML;
    divJi2.filters.item(0).Play();
  </script>
</body>
</html>