gpt4 book ai didi

CSS - float iframe

转载 作者:行者123 更新时间:2023-11-28 10:57:37 26 4
gpt4 key购买 nike

全部,

在居中布局(960px 宽度;边距:0 auto;)中,我有两个菜单栏,一个向左浮动,另一个向右浮动,在这两个菜单栏下面我想 float 一个 iframe。

不幸的是,它似乎没有漂浮。 iframe 移动到视口(viewport)最左侧的可用空间。不幸的是,由于布局居中且具有最大宽度,我无法使用绝对定位。宽度为 960px。

请问有办法实现吗?

编辑:除了我感谢的评论之外,这里是代码。

HTML:

    <iframe id="iframing" src="mannequin.html" width="640" height="500" frameborder="0" ></iframe><br />

CSS:

#container {
min-width: 960px;
height: 100%;
background: rgba(255,255,255,0.8);
margin: 0 auto;
position: relative;
} /* The is the main container on body */

#iframing {
float: left;
width: 640px;
height: 500px;
margin: 10px auto 10px;
clear: both;
}

最佳答案

大家好,

终于解决了,万岁!我已将主容器的宽度设置为 min-width,这是 iframe 延伸到远端的原因。解决。感谢您对此提供的帮助。干杯。

关于CSS - float iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4869015/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com