中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

網(wǎng)站中插入Flash動(dòng)畫層的方法(附代碼)

2018-11-01    來(lái)源:學(xué)做網(wǎng)站論壇

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬(wàn)Linux鏡像隨意使用

我們經(jīng)?吹揭恍┱愰T戶網(wǎng)站頂部會(huì)有一些動(dòng)畫來(lái)作為網(wǎng)站LOGO,當(dāng)用戶打開網(wǎng)站時(shí),動(dòng)畫就會(huì)反復(fù)的進(jìn)行播放。如下圖的網(wǎng)站,它的頂部的LOGO圖片上面就會(huì)有一群白鴿不停的飛動(dòng)。

網(wǎng)站中插入Flash動(dòng)畫層

這就是使用了Flash動(dòng)畫層插入到頂部DIV里,并且背景是透明的,好像這群白鴿在這張圖片上飛動(dòng)一樣。

下面學(xué)做網(wǎng)站論壇就給學(xué)習(xí)怎么建網(wǎng)站的學(xué)員們介紹一下網(wǎng)站中插入Flash動(dòng)畫層的方法。

方法/步驟

  1. 新建一個(gè)DIV,并且給這個(gè)DIV設(shè)置一個(gè)大的背景圖;
    
    
    <div class="topp"></div>
  2. 在這個(gè)DIV里插入Flash動(dòng)畫層的代碼:
    
    
    <script type="text/javascript">InsertFlash('/60.swf', 1003, 197,'')</script>
  3. 下載Flash動(dòng)畫,將它放到自己網(wǎng)站根目錄下。FLASH 動(dòng)畫下載地址:https://pan.baidu.com/s/14vXX7NsuUoTeFS8G7ZM3rA
  4. 在網(wǎng)站頭部標(biāo)簽</head>上面,放上以下的JS代碼,用于插入FLASH播放器。
    
    
    <script>

    //在網(wǎng)頁(yè)中插入flash
    function InsertFlash(Flash,Width,Height,ID){
        document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
        document.write("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ");
        document.write("width=\"" + Width + "\" height=\"" + Height + "\" id=\"" + ID + "\">");
        document.write("<param name=\"movie\" value=\"" + Flash + "\">");
        document.write("<param name=\"quality\" value=\"high\">");
        document.write("<param name=\"wmode\" value=\"transparent\">");
        document.write("<embed src=\"" + Flash + "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ");
        document.write("type=\"application/x-shockwave-flash\" width=\"" + Width + "\" height=\"" + Height + "\"></embed>");
        document.write("</object>");
    }

    </script>
  5. 如果放入網(wǎng)站后不顯示Flash動(dòng)畫層,請(qǐng)檢查一下動(dòng)畫的路徑是否正確,可考慮使用絕對(duì)路徑。

以下是網(wǎng)站中插入Flash動(dòng)畫層的全部代碼。(CSS背景和樣式自已寫,如果不會(huì),先學(xué)習(xí)一下html入門教程)


<script>

//在網(wǎng)頁(yè)中插入flash
function InsertFlash(Flash,Width,Height,ID){
    document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
    document.write("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" ");
    document.write("width=\"" + Width + "\" height=\"" + Height + "\" id=\"" + ID + "\">
");
    document.write("<param name=\"movie\" value=\"" + Flash + "\">");
    document.write("<param name=\"quality\" value=\"high\">");
    document.write("<param name=\"wmode\" value=\"transparent\">");
    document.write("<embed src=\"" + Flash + "\" quality=\"high\" wmode=\"transparent\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ");
    document.write("type=\"application/x-shockwave-flash\" width=\"" + Width + "\" height=\"" + Height + "\"></embed>
");
    document.write("</object>");
}
</script>

<div class="topp">
<script type="text/javascript">InsertFlash('/60.swf', 1003, 197,'')</script>  
? </div>

標(biāo)簽: 代碼 建網(wǎng)站

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:簡(jiǎn)單介紹八點(diǎn)帝國(guó)CMS構(gòu)架更新

下一篇:Dreamweaver沒有代碼、設(shè)計(jì)切換按鈕解決方法