xhtml/mobile 1.2 DOCTYPE 导致奇怪的工件

发布于 2024-09-30 13:16:21 字数 1278 浏览 1 评论 0原文

我有以下 HTML

<html> 
<body> 
<div style="background:white;width:620px; height: 464px; overflow: hidden;">
<style>.v{width:100%;background: red;border:0px; color:#FFFFFF;text-align: 
center; font-size: 11px;font-family:arial; vertical-align: middle;}</style>
<a target="_blank" href="http://www.google.com/">
<div style="height:28px;width:620px;display:table-cell" class="v">Video</div>
</a><video style="background:black" height="408px" width="100%" ></video>
<a target="_blank" >
<div class="v" style="height:28px;width:620px;display:table-cell">Bottom</div></a></div>
When I use a DOCTYPE with this I get a white line below the Video, otherwise it renders fine. This is without DOCTYPE.alt text
And this is with doctype <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">alt text
I tried tweaking CSS, but with no luck. Am I missing something?

I've the following HTML

<html> 
<body> 
<div style="background:white;width:620px; height: 464px; overflow: hidden;">
<style>.v{width:100%;background: red;border:0px; color:#FFFFFF;text-align: 
center; font-size: 11px;font-family:arial; vertical-align: middle;}</style>
<a target="_blank" href="http://www.google.com/">
<div style="height:28px;width:620px;display:table-cell" class="v">Video</div>
</a><video style="background:black" height="408px" width="100%" ></video>
<a target="_blank" >
<div class="v" style="height:28px;width:620px;display:table-cell">Bottom</div></a></div>

When I use a DOCTYPE with this I get a white line below the Video, otherwise it renders fine. This is without DOCTYPE.alt text
And this is with doctype <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">alt text
I tried tweaking CSS, but with no luck. Am I missing something?

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

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

发布评论

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

评论(1

ㄖ落Θ余辉 2024-10-07 13:16:21

将“display:block”或“vertical-align:bottom”添加到视频元素的 CSS 中。

Add "display:block" or "vertical-align:bottom" to the css of your video element.

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