我正在使用以下 outlook 代码,它在我的网站中嵌入了 Outlook 日历,但默认情况下它是左对齐的。你能告诉我让它与屏幕居中对齐吗?
谢谢
我使用的代码是
<style unselectable="on">
#wrap {
width:1000px;
height:900px;
padding:0;
position:relative;
left:0px;
top:0px;
overflow:hidden;
}
#frame {
width:1000px;
height:900px;
position:relative;
left:0px;
top:0px;
}
#frame {
-ms-zoom:0.7;
}
</style>
<div id="wrap" unselectable="on">
<iframe id="frame" src="[paste in here the link that outlook.com provides for you ... in between the quotes and without the brackets]"></iframe>
</div>
最佳答案
对于居中对齐,将 margin:0 auto 设置为其父级(如果父级的宽度以 px 为单位)或 iframe。
#wrap {
width:1000px;
height:900px;
padding:0;
position:relative;
left:0px;
top:0px;
overflow:hidden;
margin:0 auto;
}
关于css - IFrame 未居中对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30192213/