Div不会包含Firefox中的内容

时间:2013-02-11 14:39:01

标签: css html5 css3 html

我无法让容器在firefox中正确地环绕视频。 Chrome和IE工作正常。这是网站:http://www3.carleton.ca/clubs/sissa/html5/video.html

enter image description here

HTML:

<div id="video_container">
            <video id="trailers" poster="poster.jpg">
                <source src="vLast.mp4" type="video/mp4">
                <source src="vLast.webm" type="video/webm">
            </video>
            <nav>
               <div id="controls">
                    <button id="playButton">Play</button>
                    <div id="vol" onclick="showSlider()">Vol
                        <div id="containSlider"> 
                            <input type="range" id="vSlider" min="0" max="1" step="0.1" value="0.5"/>
                        </div>
                    </div>      
                    <div id="defaultBar">
                        <div id="progressBar"></div>
                    </div>

                    <button id="mute">Mute</button>
                    <button id="full" onclick="toggleFullScreen()">Full</button>
               </div> 
               <div id="playlist" class="animated fadeInRight">
                    <div class="thumb" id="tb1"><img src="TbGow.jpg" onClick="changeTrailer('vGow')"/></div>
                    <div class="thumb" id="tb2"><img src="TbLast.jpg" onClick="changeTrailer('vLast')"/></div>
                    <div class="thumb" id="tb3"><img src="TbTwo.jpg" onClick="changeTrailer('vTwo')"/></div>
               </div>
            </nav>
        </div>

CSS:

#video_container{
    -webkit-box-flex: 1; 
    -moz-box-flex: 1;
    border:5px solid black;
    margin: 20px;
    padding: 0px;
    width:100%;
    height:100%;
    position: relative;
    background-color:white;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;   
}
#video_container video{
    width: 100%;
    height: auto;
    display: block;
    z-index: 9999;
}

3 个答案:

答案 0 :(得分:1)

FYI Mozilla Firefox是唯一仍然不支持flex-wrap的浏览器。它支持inly单线flexbox。 (flex-wrap需要多行flexbox)。

功能Firefox(Gecko) - 不支持 铬
- 21.0-webkit IE浏览器 - 10.0-moz 歌剧
- 全力支持12.10 傲游 - 完全支持4.0

https://developer.mozilla.org/en-US/docs/CSS/flex-wrap

我正在寻找解决方案......

答案 1 :(得分:0)

好吧,然后蝙蝠侠:)

试试这个

<style>
    @-moz-document url-prefix() {
     #video_container{
        min-height:1px;
        max-height:1px;
      }
    }
</style>

在你的html文档中添加它!

答案 2 :(得分:0)

尝试@-moz-document url-prefix(),这是Gecko布局引擎规则。可以找到文档here。享受。