如何让嵌入的视频在 IE7 中向左浮动?

发布于 2024-08-19 19:35:09 字数 890 浏览 3 评论 0原文

如何让嵌入的视频在 IE7 中向左浮动?以下代码在 FireFox 中运行良好,文本环绕浮动的 div 和视频,但在 IE7 中,文本位于 div/视频下方。

<object height="264" width="320" style="float: left; margin: 5px;"><param name="wmode" value="transparent"><param name="AllowFullScreen" value="true" /><embed type="application/x-shockwave-flash" src="http://somevideo.com/" AllowFullScreen="true" allowScriptAccess="always" height="264" wmode="transparent" width="320"></embed></object>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum auctor sapien vel sem fermentum faucibus. Suspendisse bibendum vulputate dolor non pellentesque. Donec ornare condimentum purus eget fringilla. Ut hendrerit neque vitae velit rhoncus ac pulvinar dui pretium. Morbi rutrum mauris vitae quam ultricies molestie. Cras lorem est, placerat eu dictum ut, faucibus sed neque.</p>

How can I get an embedded video to float left in IE7? The following code works great in FireFox and the text wraps around the floated div and video, but in IE7 the text sits under the div/video.

<object height="264" width="320" style="float: left; margin: 5px;"><param name="wmode" value="transparent"><param name="AllowFullScreen" value="true" /><embed type="application/x-shockwave-flash" src="http://somevideo.com/" AllowFullScreen="true" allowScriptAccess="always" height="264" wmode="transparent" width="320"></embed></object>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum auctor sapien vel sem fermentum faucibus. Suspendisse bibendum vulputate dolor non pellentesque. Donec ornare condimentum purus eget fringilla. Ut hendrerit neque vitae velit rhoncus ac pulvinar dui pretium. Morbi rutrum mauris vitae quam ultricies molestie. Cras lorem est, placerat eu dictum ut, faucibus sed neque.</p>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野味少女 2024-08-26 19:35:09

IE 只使用 embed 标签,它忽略 object 标签。

将其放入 div 元素内,为其指定相同的大小,并在 div 上设置浮动和边距。

或者,将样式添加到对象和嵌入标记中,但如果某些浏览器使用这两种样式以便获得双边距,则可能效果不佳。

IE only uses the embed tag, it ignores the object tag.

Put it inside a div element, specify the same size for it, and set the float and margin on the div instead.

Alternatively, add the style both to the object and embed tags, but that might not work well if some browsers use both styles so that you get double margins.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文