我有一些在Chrome和Firefox中使用的CSS,但不是IE 11。
这是一个简单的水平NAV杆,带有管道分离器。
这是CSS:
.language li{
display: inline;
list-style-type: none;
width: 100%;
}
.language li + li:before {
content: " | ";
padding: 0 5px;
}
.language li:nth-child(9n+1):before {
content: '\a';
position: static;
white-space: pre;
}
这是HTML
<ul class="language">
<li> <a href="" target="_blank" title="SSM Directory Language - Español"> Español </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - HMOOB"> HMOOB </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Chinese"> 简体中文 </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - DEUTSCH"> DEUTSCH </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Arabic"> العربية </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - gujarati"> ગુજરાતી </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Russian"> РУССКИЙ </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Korean"> 한국어 </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Vietnamese"> Tiếng Việt </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Français"> Français </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Polski"> Polski </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Pennsylvaanisch Deitsch"> Pennsylvaanisch Deitsch </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - HRVATSKI"> HRVATSKI </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Tagalog"> Tagalog </a> </li>
<li> <a href="" target="_blank" title="SSM Directory Language - Hindi"> Hindi </a> </li>
</ul>
在Chrome和Firefox中它运行良好,但在IE中我得到以下内容,没有分隔符或间距:
Español HMOOB 简体中文 DEUTSCH ગુજરાતી РУССКИЙ 한국어 Tiếng Việt Français Polski Pennsylvaanisch Deitsch HRVATSKI Tagalog Hindi العربية
答案 0 :(得分:0)
你确定你有最新版本的IE吗?我已经测试了你的代码,它似乎在IE 11中运行。我有版本11.576.14393.0。