我在youtube iframe后面有一个标题,标题在iframe的右边,为什么?
I have a title after a youtube iframe, and the title is at the right of the iframe, why?
我在 html 中有一个 youtube iframe,在 iframe 之后有一个标题,例如:
iframe {
display: block;
}
<iframe src="https://www.youtube.com/embed/xxxxx" width="200" height="162" align="left"></iframe>
<H4 id="example_video">Example with a video</H4>
但是标题和视频在同一行。为什么?即使在 CSS.
中使用 display: block
,我也无法更改它
你说 align="left"
这是设置 float: left
的过时方法。
删除它。
iframe {
display: block;
}
<iframe src="https://www.youtube.com/embed/xxxxx" width="200" height="162"></iframe>
<H4 id="example_video">Example with a video</H4>
我在 html 中有一个 youtube iframe,在 iframe 之后有一个标题,例如:
iframe {
display: block;
}
<iframe src="https://www.youtube.com/embed/xxxxx" width="200" height="162" align="left"></iframe>
<H4 id="example_video">Example with a video</H4>
但是标题和视频在同一行。为什么?即使在 CSS.
中使用display: block
,我也无法更改它
你说 align="left"
这是设置 float: left
的过时方法。
删除它。
iframe {
display: block;
}
<iframe src="https://www.youtube.com/embed/xxxxx" width="200" height="162"></iframe>
<H4 id="example_video">Example with a video</H4>