2

我正在尝试将文本浮动到 iframe 的左侧。我有下面的,虽然它不会浮动。需要改变什么?画布宽度为 800px

<p class="float-left"></p>
<iframe class="float-right" width="420" height="315" src="//www.youtube.com/embed/" frameborder="0" allowfullscreen></iframe>
<div class="clear"></div>

.float-left {
position: relative;
float: left;
margin: 0px 0px 50px;
width: 250;
height: 100%;
}
.float-right {
float: right;
width: 65%;
}
4

1 回答 1

3

你甚至可能不需要 float-left 类。我创建了一个jsfiddle。这可能是您正在寻找的。

http://jsfiddle.net/8dhqs/

<iframe class="float-right" width="420" height="315" src="//www.youtube.com/embed/" 

frameborder="0" allowfullscreen></iframe>
<p>Hello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some textHello This is some text</p>
<div class="clear"></div>

.float-right {
float: right;
width: 65%;
}
于 2013-11-06T16:05:56.540 回答