如何在这个div中心制作iframe?现在它显示在左边+主div也显示在左边而不是浏览器的中心。
#video_window {
/* width: 100%;
height: 100%;*/
width: 850px;
height: 650px;
position: fixed; top:0px; left:0px;
background-color: black;
overflow: hidden;
display: none;
margin: 0 auto;
padding:1px;
z-index: 9999;
}
#video_window .video_frame {
display: none;
margin-top: 0px;
margin-bottom: 0px;
/* margin-left: 10%;
margin-right: 10%;*/
/* border: 1px solid #009; */
}
</style>
<!-- a video screen should be center -->
<div id="video_window" class="video_window" style="
">
<iframe id="video_one" class="video_frame" style="z-index: 0;" width="800" height="600"
src="http://www.youtube.com/embed/lVjdlpS_Vzw?rel=0"
frameborder="0" allowfullscreen></iframe>
<iframe id="video_two" class="video_frame" style="z-index: 0;" width="800" height="600"
src="http://www.youtube.com/embed/lVjdlpS_Vzw?rel=0"
frameborder="0" allowfullscreen></iframe>
</div>
答案 0 :(得分:0)
尝试放
margin: 0 auto;
在.video_frame