2017-09-26 66 views
-3

我想添加填充到输入区域使用 -ms-padding-bottom:8px;在IE11中,但它不工作有人可以帮我 请。只能给填充底部只有IE浏览器

+0

您需要发布问题标记的完整,但小例子, :[mcve]但我不确定这样的前缀标签在IE11中工作。 – Rob

+0

[只在IE上应用样式]的可能重复(https://stackoverflow.com/questions/11173106/apply-style-only-on-ie) –

+0

输入{ font-family:GEInspiraSans; font-size:18px; 颜色:#2F3133; padding-bottom:6px; -moz-padding-bottom:8px; -ms-padding-bottom:8px; } – GiggleGirl

回答

2

您可以使用<head>中的条件标记来为IE(6 - > 9)仅包含样式表。

<!--[if IE]> 
    <link rel="stylesheet" type="text/css" href="all-ie-only.css" /> 
<![endif]--> 

this article

对于IE 10+:

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { 
    .foo{background: red;} 
} 

对于IE 11只:

_:-ms-fullscreen, :root .foo { background: red; } 
+0

条件注释已从IE中删除,并且在IE11中不起作用。 – Rob

+0

答复编辑添加IE 10+和IE 11。 –