Javascript 多个相邻的iframe
嘿,伙计们,有没有可能让3个iFrame并排放在一起,而不是垂直向下?这是我需要放在旁边的iframe代码Javascript 多个相邻的iframe,javascript,jquery,html,iframe,Javascript,Jquery,Html,Iframe,嘿,伙计们,有没有可能让3个iFrame并排放在一起,而不是垂直向下?这是我需要放在旁边的iframe代码 echo("<br /><iframe src='//player.vimeo.com/video/99496559' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p>&
echo("<br /><iframe src='//player.vimeo.com/video/99496559' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href='http://vimeo.com/99496559'><b>Daniel talks about the Austplan model</b></a>.</p>");
echo("<iframe src='//player.vimeo.com/video/99582077' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href='http://vimeo.com/99582077'>Peace of mind</a>.</p>");
echo("<iframe src='//player.vimeo.com/video/99579066' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href='http://vimeo.com/99579066'>WHO IS DANIEL RENNEBERG?</a>.</p>");
echo(
);
回声(“”);
回声(“”);
任何帮助都将不胜感激。谢谢。将3个iFrame放在一张表中:
<table>
<tr>
<td>iframe1</td><td>iframe2</td><td>iframe3</td>
</tr>
</table>
IFrame1Frame2iFrame3
尝试使用:
style="display:inline"
这应该行得通。在找到答案之前,我有几条建议
- 首先,看看这个。它将允许您编写更干净的代码
- 其次,您不需要使用
。你可以,但是没有它会更干净echo
.row {
clear: both;
}
.column-3 {
float: left;
width: 30%;
}
HTML:
<div class="row">
<div class="column-3">
<iframe src="//player.vimeo.com/video/99496559" width="250" height="150" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="http://vimeo.com/99496559"><b>Daniel talks about the Austplan model</b></a>.</p>
</div>
<div class="column-3">
<iframe src="//player.vimeo.com/video/99582077" width="250" height="150" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="http://vimeo.com/99582077">Peace of mind</a>.</p>
</div>
<div class="column-3">
<iframe src="//player.vimeo.com/video/99579066" width="250" height="150" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p><a href="http://vimeo.com/99579066">WHO IS DANIEL RENNEBERG?</a>.</p>
</div>
</div>
只需使用css并对iframes内联块进行编码即可
iframe{
display:inline-block;
/* other designs you want*/
}
只要把iframes放在div里就可以了
<style>
.frame{
float:left;
margin:20px;
}
</style>
<div class="frame">
<iframe src='a.html' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href='http://vimeo.com/99496559'><b>Daniel talks about the Austplan model</b></a>.</p>
</div>
<div class="frame">
<iframe src='a.html' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href='http://vimeo.com/99582077'>Peace of mind</a>.</p>
</div>
<div class="frame">
<iframe src='a.html' width='250' height='150' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href='http://vimeo.com/99579066'>WHO IS DANIEL RENNEBERG?</a>.</p>
</div>
.框架{
浮动:左;
利润率:20px;
}