Ref*_*x84 2 html css internet-explorer-7 internet-explorer-6
我试图让我的网站在ie6和ie7上正确显示,他们说你必须使用这个声明:
<!--[if IE 6]> <link href="ie6.css" rel="stylesheet" type="text/css"> <![endif]-->
Run Code Online (Sandbox Code Playgroud)
现在我在哪里将此语句放在我的HTML页面中?
编辑:
所以我在doctype之后添加了这个:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org
/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--[if lt IE 7]><html class="ie6" lang="en"><![endif]-->
<!--[if IE 7]><html class="ie7" lang="en"><![endif]-->
<!--[if IE 8]><html class="ie8" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html lang="en"><!--<![endif]-->
<head>
Run Code Online (Sandbox Code Playgroud)
在我的样式表ie6.css我有这个:
.ie6 #magazine_style_left {
position:relative;
float:left;
width:150px;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:14px;
color:#999999;
font-style:italic;
line-height:18px;
}
.ie6 #magazine_style_right {
position:relative;
float:right;
width:519px;
border-left: 1px solid #F2F2F2;
}
Run Code Online (Sandbox Code Playgroud)
我已经在同一页面上添加了css但它仍然无法正常工作.它就像没有拿起/使用ie6 css
在头部标签内
<head>
<!--[if IE 6]> <link href="ie6.css" rel="stylesheet" type="text/css"> <![endif]-->
</head>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4531 次 |
| 最近记录: |