Internet explorer 这个代码有什么问题?简单VML页面为空

Internet explorer 这个代码有什么问题?简单VML页面为空,internet-explorer,vml,Internet Explorer,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

有人能指出我在这段代码中遗漏了什么吗?尽管页面尽可能简单,但仍然是空白的



<!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>

VML
v\:*{behavior:url(#default#VML);}
o\:*{behavior:url(#default#VML);}

代码取自其他SO问题中建议的代码,作为良好的参考。

您必须在
元素中添加
display:inline block
,并在设置宽度和高度时包括CSS单元
px
。以下代码的修订版本适用于IE 7:

<!DOCTYPE html>
<html  xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>VML</title>
<style>
v\:* { behavior: url(#default#VML);display:inline-block}
o\:* { behavior: url(#default#VML);}
</style>
</head>
<body>
    <v:rect style="width:100px;height:100px;" fillcolor="blue" strokecolor="red"></v:rect>
</body>
</html>

VML
v\:*{behavior:url(#default#VML);display:inline block}
o\:*{behavior:url(#default#VML);}

display:inline block
的参考可在中找到。您必须在
元素中添加
display:inline block
,并在设置宽度和高度时包括CSS单元
px
。以下代码的修订版本适用于IE 7:

<!DOCTYPE html>
<html  xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>VML</title>
<style>
v\:* { behavior: url(#default#VML);display:inline-block}
o\:* { behavior: url(#default#VML);}
</style>
</head>
<body>
    <v:rect style="width:100px;height:100px;" fillcolor="blue" strokecolor="red"></v:rect>
</body>
</html>

VML
v\:*{behavior:url(#default#VML);display:inline block}
o\:*{behavior:url(#default#VML);}
显示:内联块的参考可在