HTML <iframe> align 属性
标签" href="tag-main.html"><main>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<html>
<picture>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
< template>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
HTML <iframe> align 属性
实例
右对齐的 <iframe>:
<iframe src="http://www.runoob.com/" width="200"
height="200" align="right">
</iframe>
</iframe>
浏览器支持
虽然 align 属性已废弃,但是该属性仍然得到所有主流浏览器的支持。
定义和用法
HTML5 不支持 <iframe> align 属性。请使用 CSS 代替。
在 HTML 4.01 中,<iframe> 的 align 属性 已废弃。
align 属性规定 <iframe> 相对于周围元素的对齐方式。
<iframe> 元素是内联元素(不会在页面上插入新行),这意味着文本和其他元素可以围绕在其周围。所以,align 属性可以帮助我们规定 <iframe> 相对于周围元素的对齐方式。
兼容性注释
在 HTML 4.01 中,<iframe> 的 align 属性已废弃。请使用 CSS 代替。
CSS 语法:<iframe style="float:right">
在我们的 CSS 教程中,您可以找到更多有关 float 属性 的细节。
语法
<iframe align="left|right|middle|top|bottom">
属性值
| 值 | 描述 |
|---|---|
| left | 向左对齐 iframe。 |
| right | 向右对齐 iframe。 |
| middle | 居中对齐 iframe。 |
| top | 在顶部对齐 iframe。 |
| bottom | 在底部对齐 iframe。 |
HTML <iframe> 标签