0

サイトに配置する無料のビデオプレーヤーを探していて、非バーブラスターを見つけましたが、他の要素の後ろに設定することはできません-属性z-indexはそれで機能しません、彼に協力を強制するための解決策を知っていますか?私のコードの簡単な部分:

<div style="position:relative;">
    <div id="main-video" style="position:absolute;top:0px;left:0px;z-index:10;">
        To watch this video, you need the latest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash-Player</a> and active javascript in your browser.
    </div>

    <img src="media/nice-flowers.jpg" alt="alt" style="position:absolute;left:0px;top:400px;z-index:100" />
</div>


<script type="text/javascript">
    var flashvars = {};
        flashvars.mediaURL = "../../uploads/files/movie.mp4";
        flashvars.teaserURL = "uploads/files/start_frame.jpg";
        flashvars.allowSmoothing = "true";
        flashvars.autoPlay = "false";
        flashvars.buffer = "6";
        flashvars.showTimecode = "true";
        flashvars.loop = "false";
        flashvars.controlColor = "0x3fd2a3";
        flashvars.controlBackColor = "0x000000";
        flashvars.scaleIfFullScreen = "true";
        flashvars.showScalingButton = "true";
        flashvars.defaultVolume = "100";
        flashvars.crop = "false";
        flashvars.onClick = "toggleFullScreen";

    var params = {};
        params.menu = "false";
        params.allowFullScreen = "true";
        params.allowScriptAccess = "always"

    var attributes = {};
        attributes.id = "nonverblaster";
        attributes.bgcolor = "#000000"
    function embedSWF()
    {
        swfobject.embedSWF("js/video_player/video_player.swf", "main-video", "762", "429", "9", "js/video_player/expressinstall.swf", flashvars, params, attributes);
    }
    embedSWF();
</script>
4

1 に答える 1

0

wmodeに設定する必要がありますopaque

したがって、スクリプトで、次のような行を追加しますparams.wmode = "opaque";

于 2012-04-22T17:44:05.773 に答える