这段代码有什么问题?简单 VML 页面为空白
有人可以指出我在这段代码中缺少什么吗?尽管页面已经尽可能简单,但它仍然是空白的。
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>VML</title>
<style>
v\:* { behavior: url(#default#VML);}
o\:* { behavior: url(#default#VML);}
</style>
</head>
<body>
<v:rect style="width:100;height:100;" fillcolor="blue" strokecolor="red"></v:rect>
</body>
</html>
该代码取自 garybeene.com ,在其他 SO 问题中已建议为一个很好的参考。
Could someone point out what I am missing with this code? The page remains blank despite it being as simple as I can make it.
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>VML</title>
<style>
v\:* { behavior: url(#default#VML);}
o\:* { behavior: url(#default#VML);}
</style>
</head>
<body>
<v:rect style="width:100;height:100;" fillcolor="blue" strokecolor="red"></v:rect>
</body>
</html>
The code was take from garybeene.com which has been suggested in other SO questions as a good reference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须在
元素中添加
display:inline-block
,并在设置宽度和高度时包含 CSS 单位px
。您的代码的以下修订版本适用于 IE 7:display:inline-block
的参考可在 http://msdn.microsoft.com/en-us/library/bb263897(v=vs.85).aspxYou must add
display:inline-block
in the<style>
element and include the CSS unitpx
when setting the width and height. The following revised version of your code works in IE 7:Reference for the
display:inline-block
can be found at http://msdn.microsoft.com/en-us/library/bb263897(v=vs.85).aspx