一个js实现的字体自动打印的效果

<html>
  <head>
         <title> 诗歌</title>
   <style>
  h3{
    text-align:left;
    color:black;
    font-size:30px;
    text-indent:2em;
    line-height:2em;
    margin:0px;
   }
 .img1{
  float:left;
  width:620;
  border:1px skyblue inset; 
  margin:0px auto;
  padding:0px ;
  }
  .img2{
  float:right;
  width:620;
  border:1px skyblue inset; 
  margin:0px auto;
  padding:0px ;
  }
 
  body{ 
        
         text-align:center;
         background-color:lightblue;
         margin:0px;
          }
   h1{
     color:green;
     font-size:50px;
     font-family:方正舒体;  
   }
   </style>
  </head>
  <body>
       
<SCRIPT language=VBScript>
dim w,t,p,mm,c,mr,dy,tmp,vs:vs=5:dy=1:p=1:mr="<BR><BR><BR>":c="<font color=white><B>|"&mr:Set w = document.body
sub tp
	m=mid(t,p,1):if m="" then c=mr
	if m="`" then m="":mm=mid(mm,1,len(mm)-1)
	if m="<" then av=instr(mid(t,p),">"):m=mid(t,p,av):p=p+av-1
	if m="&" then av=instr(mid(t,p),";"):m=mid(t,p,av):p=p+av-1
	tmp=100:if m="." then tmp=400 else if m="," then tmp=200 else if m=" " then tmp=200
	if w.scrollHeight-w.scrollTop>w.offsetHeight then w.scrollTop=w.scrollTop+int(dy):dy=dy+dy/vs else dy=1
	mm=mm&m:w1.innerHTML=mm&c:p=p+1:if p<=len(t)+1 then SetTimeOut "tp",16+tmp else w.scroll="yes"
end sub
sub     window_onload()
	w.scroll="no"
	w.bgcolor="#A8A8A8"
	w.style.cursor="crosshair"
	'-------------------
	t=w0.innerHTML:tp
end sub


</SCRIPT>
<DIV id=w0  style="DISPLAY: none"> 
        <h1>思秋</h1>  
      
<h3>
秋高气爽的日子
  <pre> 
   一种自我放纵的心境
   
   在落叶与秋风中
   
   徘徊
   
   沉迷于落叶的伤感
   
   消醉于秋风的寒意
   
   于是我
   
   开始思念你
   
   哪怕红叶落尽
   
   哪怕秋风寒寒
   
   只要来年有春天
   
   我把相思高挂枝头
   
   等待
   
   春的萌芽
</pre>
</h3>
</div>   
   <bgsound src="19.mid ">
<DIV id=w1></DIV>

</body>
 </html>


效果如下:

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值