IE8和border css属性 [英] IE8 and border css property on select menus
问题描述
在IIS中查看一个非常简单的HTML片段时,我遇到了一个非常奇怪的行为。
<$> c $ c><!DOCTYPE HTML PUBLIC - // W3C // DTD HTML 4.01 // ENhttp://www.w3.org/TR/html4/strict.dtd\">
< html>
< head>
< style>
.iWantaBorder
{
border:red solid 1px;
}
< / style>
< / head>
< body>
< select class =iWantaBorder>
< option> 1< / option>
< / select>
< / body>
< / html>
另存为html文件到您的桌面。
当在IE8中查看时,选择菜单有一个红色边框。
现在将文件复制到IIS 5.1或IIS6中的网站或虚拟目录。 p>
在IE8中浏览到该文件...没有红边。
任何人都可以告诉我这里发生了什么?我真的想在这个菜单上有一个边框。思想这应该是简单的诚实,但我很困惑!
尝试将其放在您的HEAD标记中:
< meta http-equiv =X-UA-Compatiblecontent =IE = edge>
如: http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx
I am getting a really strange behaviour when viewing a very simple piece of HTML in IE, served up by IIS. I am at a loss to explain this...
Take the following html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
.iWantaBorder
{
border:red solid 1px ;
}
</style>
</head>
<body>
<select class="iWantaBorder">
<option>1</option>
</select>
</body>
</html>
Save as html file to your desktop. When viewed in IE8, the select menu has a red border.
Now copy the file to a website or virtual directory in IIS 5.1 or IIS6.
Browse to that file in IE8... no red border.
Can anyone tell me what is going on here? I really want a border on this menu. Thought this should be simple to be honest, but I'm pretty much confused!
try putting this in your HEAD tag:
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
as per: http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx
这篇关于IE8和border css属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!