本文介绍了如何在iframe旁边浮动文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在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%;
}
解决方案

您甚至可能不需要左浮动类.我创建了一个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%;
}

I'm trying to float text left of an iframe. I have the below, though it will not float. What needs to be changed? Canvas width is 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%;
}
解决方案

You might not even need float-left class. I have created a jsfiddle. It might be what you are looking for.

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%;
}

这篇关于如何在iframe旁边浮动文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 04:22