IE11:<link> 不工作
IE11: <link> not working
我在 <head>
标签之间插入以下内容:
<link rel="stylesheet" type="css/stylesheet" href="fileadmin/css/konsensusempfehlung.css">
此样式表会影响我在 Firefox 中的 HTML 代码。
然而在IE11中它没有。
konsensusempfehlung.css:
tr.hauptzeile {
background-color: #FFFFFF;
text-align: left;
}
tr.tr-even{
background-color: #edf7f9;
}
th {
padding: 0.5em;
}
td.td-0 {
font-weight: bold;
}
td {
padding: 0.5em;
}
.table-scrollable {
width: 100%;
overflow-y: auto;
margin: 0 0 1em;
}
.table-scrollable::-webkit-scrollbar {
-webkit-appearance: none;
width: 14px;
height: 14px;
}
.table-scrollable::-webkit-scrollbar-thumb {
border-radius: 8px;
border: 3px solid #fff;
background-color: rgba(0, 0, 0, .3);
}
我该如何解决这个问题?
使用正确的类型。
<link type="text/css" rel="stylesheet" href="yourLink">
您需要将类型属性的值从 "css/stylesheet"
更改为 "text/css"
。
请试试这个类型
<head>
<link rel="stylesheet" type="text/css" href="konsensusempfehlung.css" />
</head>
或者如果你只想定位 IE,那么试试这个。
<head>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="konsensusempfehlung.css" />
<![endif]-->
</head>
让我知道进一步澄清
应该在link类型中使用text/css
。同时将 href 设置为 your link
。不过应该不是浏览器问题
我在 <head>
标签之间插入以下内容:
<link rel="stylesheet" type="css/stylesheet" href="fileadmin/css/konsensusempfehlung.css">
此样式表会影响我在 Firefox 中的 HTML 代码。 然而在IE11中它没有。
konsensusempfehlung.css:
tr.hauptzeile {
background-color: #FFFFFF;
text-align: left;
}
tr.tr-even{
background-color: #edf7f9;
}
th {
padding: 0.5em;
}
td.td-0 {
font-weight: bold;
}
td {
padding: 0.5em;
}
.table-scrollable {
width: 100%;
overflow-y: auto;
margin: 0 0 1em;
}
.table-scrollable::-webkit-scrollbar {
-webkit-appearance: none;
width: 14px;
height: 14px;
}
.table-scrollable::-webkit-scrollbar-thumb {
border-radius: 8px;
border: 3px solid #fff;
background-color: rgba(0, 0, 0, .3);
}
我该如何解决这个问题?
使用正确的类型。
<link type="text/css" rel="stylesheet" href="yourLink">
您需要将类型属性的值从 "css/stylesheet"
更改为 "text/css"
。
请试试这个类型
<head>
<link rel="stylesheet" type="text/css" href="konsensusempfehlung.css" />
</head>
或者如果你只想定位 IE,那么试试这个。
<head>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="konsensusempfehlung.css" />
<![endif]-->
</head>
让我知道进一步澄清
应该在link类型中使用text/css
。同时将 href 设置为 your link
。不过应该不是浏览器问题