下面的中心是我的代碼,我試圖居中的iframe,但它總是會留下!這裏是小提琴http://jsfiddle.net/4yL4od8j/嵌入一個響應的YouTube iframe來的頁面
.videowrapper {
text-align : center;
float: none;
clear: both;
width: 100%;
position: relative;
padding-bottom: 56.25%;
padding-top: 25px;
height: 0;
}
.videowrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
max-width: 700px;
max-height: 400px;
}
我的HTML
<center> <div class="videowrapper "><iframe src="http://www.youtube.com/embed/VA770wpLX-Q?&rel=0&theme=light&autohide=1&color=white" frameborder="0" allowfullscreen></iframe></a></div></center>
的可能的複製[我該如何調整在引導中心的YouTube嵌入式視頻](https://stackoverflow.com/questions/22433616/how-can-i-align -youtube-embedded-video-in-the-the-center-in-bootstrap) – 2017-08-08 18:23:19