我遇到了这个非常奇怪的问题,因为我精通CSS。但是,我有一个CSS文件,我正在尝试加载我的PHP文档,它通过网络选项卡加载正常,但没有在页面上加载它的CSS。
这是我检查的内容:
1)文件名拼写正确,没有特殊字符,空白等。 2)我的控制台没有错误,表明文件没有正确加载。 3)我在文件上收到了200的状态,但是当我去预览css文件时。它告诉我“此请求无法预览” 4)禁用Adblock。 5)我通过CSS验证器验证,没有返回错误或警告。
我正在使用PHP和JavaScript,但我的代码中没有重定向。
我正在尝试在我的PHP文档中链接这个css文件,而我的其他css文件工作正常。
table {
width: 100%;
border-collapse: collapse;
}
/* Zebra striping */
tr:nth-of-type(odd) {
background: #f8f8f8;
}
th {
background: #333;
color: white;
font-weight: normal;
}
td, th {
padding: 6px;
text-align: left;
}
.iconcontainer {
width:100%;
}
.smart-icon {
float:left;
padding-right:2%;
max-width:75px;
max-height:72px;}
/*
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media
only screen and (max-width: 768px),
(min-device-width: 768px) and (max-device-width: 1024px) {
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr:nth-of-type(odd) {
background: #ededed;
}
td {
border: none;
position: relative;
padding-left: 39% !important;
width:58% !important;
}
td:before {
position: absolute;
top: 10px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
font-size:11px;
font-style:italic;
opacity:0.6;
}
.SHOPPING-wrapper table tr.titlebox {
background:#fff;
border:0;
}
.SHOPPING-wrapper table tr.titlebox td {
padding-left:5px !important;
}
.SHOPPING-wrapper table tr.titlebox td::before {
display:none !important;
}
.SHOPPING-wrapper table tr.gray {
display:none !important;
}
/*
Label the data
*/
#metro td:nth-of-type(1):before { content: "Name"; }
#metro td:nth-of-type(2):before { content: "Route"; }
#metro td:nth-of-type(3):before { content: "Telephone"; }
#metro td:nth-of-type(4):before { content: "Website"; }
#taxis td:nth-of-type(1):before { content: "Service"; }
#taxis td:nth-of-type(2):before { content: "Telephone"; }
#ferries td:nth-of-type(1):before { content: "Name"; }
#ferries td:nth-of-type(2):before { content: "Location"; }
#ferries td:nth-of-type(3):before { content: "Telephone"; }
#ferries td:nth-of-type(4):before { content: "Website"; }
}
这是我的CSS无法加载。它在网络选项卡上有200个成功加载,但不允许我在浏览器或网络选项卡中预览文件。但是,当我打开文件时,里面有代码。
{{1}}