1

我有一个带有添加此按钮(实际上是共享按钮)和一些视频的 HTML 简单页面。我的问题是,当我单击 SHARE 按钮时,浏览器屏幕的中心会弹出一个小窗口(一个 div),使其位置保持不变。

当我滚动窗口时,此添加此窗口会与页面上的视频重叠。这在 Firefox 中效果很好,但在 IE 和 Chrome 中效果不佳。

这是我的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        #at16p, #atie6ifh
        {
            overflow-y: auto !important;
        }        
    </style>
</head>
<body>
    <!-- AddThis Button BEGIN -->
    <a class="addthis_button" style="text-align: right;" href="http://addthis.com/bookmark.php?v=250&amp;pub=xa-4ac61e0801642c41">
        <img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16"
            alt="Bookmark and Share" style="border: 0" /></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=xa-4ac61e0801642c41"></script>

    <!-- AddThis Button END -->
    <center>
        <div id="divVideoDisplay" runat="server" style="width: 100%; padding-bottom: 20px;
            z-index: -10000; overflow: hidden;">
            <br />
            <h1>
                First Video</h1>
            <br />
            <object type='application/x-shockwave-flash' data='http://www.videowebtown.com/community/newlightplayer/flvplayer.swf?file=http%3A%2F%2Fsq.txdnl.com%2Fvwt%2Fd%2Fa%2Fv%2Fi%2Fdavidmarsh98%2Fvideo%2F26198%2FFLV%2F98188.flv' style="z-index: -1;" 
                width='640' height='480' bgcolor='FFFFFF' border='1'>
                <param name='movie' value='http://www.videowebtown.com/community/newlightplayer/flvplayer.swf?file=http%3A%2F%2Fsq.txdnl.com%2Fvwt%2Fd%2Fa%2Fv%2Fi%2Fdavidmarsh98%2Fvideo%2F26198%2FFLV%2F98188.flv'/>
                <param name='bgcolor' value='FFFFFF'/>
                <param name='Windowless' value='true'/>
                <embed src='http://www.videowebtown.com/community/newlightplayer/flvplayer.swf?file=http%3A%2F%2Fsq.txdnl.com%2Fvwt%2Fd%2Fa%2Fv%2Fi%2Fdavidmarsh98%2Fvideo%2F26198%2FFLV%2F98188.flv'
                    quality='high' bgcolor='#ffffff' width='640' height='480' name='movie' allowscriptaccess='sameDomain'
                    type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'
                    border='1'>
            </object>
            <br>
            <b style="color: red">FREE</b> service provided by <a href='http://www.videowebtown.com'
                target='_new'><u>VideoWebTown.com</u></a>
            <br />
            <h1>
                Second Video</h1>
            <br />
            <object width="425" height="344" style="z-index: -1;" >
                <param name="movie" value="http://www.youtube.com/v/rrrx9izp0Lc&hl=en_US&fs=1&">
                </param>
                <param name="allowFullScreen" value="true"></param>
                <param name="allowscriptaccess" value="always"></param>
                <param name='Windowless' value='true'/>
                <embed src="http://www.youtube.com/v/rrrx9izp0Lc&hl=en_US&fs=1&" type="application/x-shockwave-flash"
                    allowscriptaccess="always" allowfullscreen="true" width="425" height="344">
        </embed>
            </object>
        </div>
    </center>

</body>

</html>

任何帮助/意见表示赞赏。

4

2 回答 2

3

那么这个代码需要

<param name="wmode" value="transparent">

要添加到对象标签中,并且该<embed>标签需要一个属性为wmode="transparent".

IE<embed wmode="transparent" ... />

这对我有用。

于 2009-11-25T13:50:44.917 回答
0

尝试添加<param name="wmode" value="transparent">

这是 IE 中的一个众所周知的错误,但我不确定为什么它在 Chrome 中不起作用,所以我希望这能解决这两种浏览器的问题。另外,您是否检查过 Z-index 以确定?(这对于 IE 无关紧要,但对于 Chrome 可能)

于 2009-11-25T06:38:16.113 回答