以CSS为中心



我无论如何都不是编码器,我的培训很少,只能通过我可以在线挑选的东西。话虽如此,如果这是一个愚蠢的问题,我深表歉意!我是一名摄影师,当他们的图像准备就绪时为客户制作这些幻灯片,并且我遇到了一个问题,使它们(水平)将其居中在所显示的任何页面上。在我的查看画廊中,有几个不同的页面宽度,因此即使我手动使用(即95px)或该页面的任何内容中心,显然它在具有不同站点宽度的不同页面上都无法使用。我相信我可以在所有这些幻灯片上添加一个简单的通用命令,这将使它们在每个页面上居中,但我无法弄清楚 - 任何帮助都将不胜感激!这是我正在使用的代码...

<style>
    .ss-embed-container-89670 {
        position:relative; padding-bottom:680px; 
        height:0; overflow:hidden; max-width:1020px} .ss-embed-container-89670 
        iframe {position:absolute; top:0;left:0; width:100%!important; 
        height:100%!important;
    } 
</style>
<div class="ss-embed-container-89670"><iframe src="https://greg-
    ross.smartslides.com/morgan-clayton?pt=ed" frameborder="0" 
    webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

您可以尝试做类似的事情:

<div style="margin: 0 auto;">
    <div class="ss-embed-container-89670"><iframe src="https://greg-
        ross.smartslides.com/morgan-clayton?pt=ed" frameborder="0" 
        webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
    </div>
</div>

最新更新