基德KID.1412 发表于 2013-2-7 17:05:39

我的HTML笔记

图片链接去边框:a img {border: none;}

添加背景音乐:<EMBED src="文件路径.mp3" autostart="true" loop="true" width="10%" height="10%" hidden="true">

按钮动画:<html><head><script type="text/javascript">function mouseOver(){document.b1.src ="图片路径1.jpg"}function mouseOut(){document.b1.src ="图片路径2.jpg"}</script></head><body><a href="/index.html" target="_blank"><img border="0" alt="Visit W3School!" src="/i/eg_mouse2.jpg" name="b1"   onmouseout="mouseOut()" /></a></body></html>

插入flash模块:<EMBED style="LEFT: 40px; POSITION: absolute; TOP: -70px" src="http://hexun.com/Flash/zhiwu_2.swf" width="1024" height="1000" type="application/x-shockwave-flash" quality="high" wmode="transparent"></EMBED>

滚动条自动滚:<table width="1024" border="0">            <tr>            <td>                <DIV id=demo style="OVERFLOW: auto; WIDTH:770px">                     <TABLE cellSpacing=0 cellPadding=0 align=left border=0 >                        <TR>                            <TD id=demo1 vAlign=top>                              <table width="0" border="0" align="center" cellpadding="0" cellspacing="0">                                    <tr>                                        <td width="250"><img src="图片路径.jpg" width="250" height="200"></td>                                        <td width="250"><img src="图片路径.jpg" width="250" height="200"></td>                                        <td width="250"><img src="图片路径.jpg" width="250" height="200"></td>                                    </tr>                              </table>                            </TD>                            <TD id=demo2 vAlign=top></TD>                        </TR>                  </TABLE>                </DIV>                <div align="center">                     <SCRIPT>                        var speed=1                        demo2.innerHTML=demo1.innerHTML                        function Marquee(){                            if(demo2.offsetWidth-demo.scrollLeft<=3)                              demo.scrollLeft-=demo1.offsetWidth                            else{                              demo.scrollLeft++                            }                        }                        var MyMar=setInterval(Marquee,speed)                        demo.onmouseover=function() {clearInterval(MyMar)}                        demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}                     </SCRIPT>                </div>            </td>            </tr>      </table>

跑马灯:<marquee width=1000 scrollamount=8 behavior=score/slide/alternate align=middle border=1>===</marquee>
页: [1]
查看完整版本: 我的HTML笔记