我曾與遠程類似的問題最近,我的自定義CSS不會在所有的工作:Custom CSS Won't Work With Bootstrap奇怪的問題/ CSS
我固定的外部參考引導這個問題(使用CDN)和我能夠完美地使用我自己的CSS。
就在今天,我試圖改變一個元素的文本大小,它只有在我像之前使用<style>
元素時才起作用。當我刪除來引導鏈接,引導要素繼續工作(在下面的例子中板)
/* Menu Box */
.textcenter {
\t text-align: center;
}
.panelcolors {
\t background-color: #6fa1f2;
\t border-color: #6fa1f2;
}
#panelhcolors {
\t background-color: #6394e2;
\t border-color: #6394e2;
\t color: #f7f7f7;
}
.paneltext {
\t color: #f7f7f7;
}
/* Menu Box */
/* BG CYCLER */
#background_cycler {
\t padding:0;
\t margin:0;
\t width:100%;
\t position:absolute;
\t top:0;
\t left:0;
\t z-index:-1
}
#background_cycler img {
\t position:absolute;
\t left:0;
\t top:0;
\t width:100%;
\t z-index:1
\t background-size: cover;
\t background-position: center;
}
#background_cycler img.active {
\t z-index:3
}
/* BG CYCLER */
<!DOCTYPE html>
<html>
<head>
<title>Help Menu</title>
<!--
==============================================================================================================
REFERENCES (BOOTSTRAP 3.3.7) (jQuery 3.1.1)
==============================================================================================================
-->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> -->
<link rel="stylesheet" href="/custom/style.css">
<script src="/custom/programming.js"></script>
<!--
==============================================================================================================
BOOTSTRAP REFERENCES DISTRO 3.3.7
==============================================================================================================
-->
</head>
<body>
<!-- BACKGROUND -->
<div id="background_cycler" >
<script>
$('#background_cycler').hide();//hide the background while the images load, ready to fade in later
</script>
<img class="active" src="/images/background/bg_1.jpg" alt=""/>
<img src="/images/background/bg_2.jpg" alt="" />
<img src="/images/background/bg_3.jpg" alt="" />
<img src="/images/background/bg_4.jpg" alt=""/> \t \t
<img src="/images/background/bg_5.jpg" alt="" />
</div>
<!-- HOME BUTTON -->
<br>
<br>
<div>
\t <br>
\t <center>
\t \t \t <button type="button" class="btn btn-info btn-circle btn-lg"><i class="glyphicon glyphicon-home"></i></button> <br>
\t </center>
</div> <br>
<br>
<br>
<br>
<br>
<div style="max-width: 50%;" class="container">
\t <div class="panel panel-default panelcolors">
\t \t <div id="panelhcolors" class="panel-heading"><h1 class="textcenter">What Do You Need Help With?<br> WORK IN PROGRESS</h1></div>
<br>
\t \t \t <p>
\t \t \t \t <div class="textcenter paneltext">
\t \t \t \t \t <div>
\t \t \t \t \t \t <a href="/main/fp.html">Frequent Problems</a>
\t \t \t \t \t </div>
<br>
\t \t \t \t \t <div>
\t \t \t \t \t \t Printers
\t \t \t \t \t </div>
<br>
\t \t \t \t \t <div>
\t \t \t \t \t \t Drivers
\t \t \t \t \t </div>
<br>
\t \t \t \t </div>
\t \t \t </p>
\t </div>
</div>
</body>
</html>
爲了進一步測試我註釋掉鏈接到我的自定義CSS,並且面板並且所有東西都消失了(除了顏色外,我自定義CSS中沒有任何內容與面板的存在有關)。
我已將自定義CSS的鏈接添加回HTML,並且所有內容都恢復正常。然後,我完全從服務器上刪除了我的自定義CSS文件,並且網站上的任何內容都沒有改變。當沒有任何內容被註釋掉時,對我的自定義CSS文件的任何編輯都不會產生任何效果(即使它們是在我昨天離開工作之前完成的)。
任何想法可能是錯誤的?
在代碼片段編輯器中使用「tidy」;) – mayersdesign