[英]How to Center Align the iframe
我想將iframe居中對齊,但它要左對齊,這是我的代碼(下面的代碼將在大型顯示器上運行,高度,寬度未知)
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cast - Main Page</title>
<style>
body {
height:100%;
width:100%;
padding:0px;
margin:0px;
overflow-y:hidden;
overflow-x:hidden;
}
.iframe {
width:100%;
height:100%;
padding:0px;
}
</style>
</head>
<body>
<iframe src="imagegallery.html" class="iframe" id="mainframe"></iframe>
</body>
</html>
將其包裝在div中並應用px; 為我工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.