好吧,所以我真的很新。幾個小時前,我將樣式類「P」設置爲css風格類別不變
...// <Style>
P {color:black, font-size: 16pt;}
...// </Style>
並且我認爲它可能會破壞某些東西!我所有的其他代碼行都在工作,但是這個!我認爲它會使每個默認的新段落黑色16pt ......但它不會讓我改變顏色。
.need1類未被正確調用,並顯示爲先前設置的黑色16pt,而不是中心的24位紅色,粗體文本的.need1類。
此外,Jfiddler保持tellng我
</P>
的收盤不當,所以我把他們趕走,但我應該把它們放回去?我已經嘗試了兩種方法,但並未解決問題。
<STYLE>.
.red1 {color: #ff0000}
.orange1 {color: }
.blue1
.green1
.need1 {font-size:24pt; color:red; font-weight: bold; text-align:center}
.need2 {font-size:16pt; color:red;}
.want {font-size:16pt; color:orange}
.fun {font-size:14pt; color:green}
.cata {font-size:20pt; color:black; font-weight: bold; text-decoration:underline; text-align: left}
.specs1 {font-size:20pt; color:blue; font-weight:bold; text-align:center; text-decoration: underline}
.specs2 {font-size:16pt; color: blue; text-align:center}
.head {font-size:28pt; color:purple; text-align:center;
text-decoration:underline; font-weight: bold}
.ex {font-size: 18; color:black; text-align: right}
a:link {color:blue; background-color:transparent; text-decoration:none}
a:visited {color:purple; background-color:transparent; text-decoration:none}
a:hover {color:red; background-color:transparent; text-decoration:underline}
a:active {color:yellow; background-color:transparent; text-decoration:underline}
</STYLE>.
<P Class = "head"> TEXT
</P>
<P Class = "need1"> TEXT
<BR>TEXT <span Class = "red1">TEXT</span> TEXT
<BR>TEXT
<BR>
<BR>TEXT
<P Class = "cata">
TEXT
</P>
<P>
<BR>TEXT = <span class= "red1">RED</span>
<BR>TEXT = ORANGE
<BR>TEXT =
<P Class = "head">
TEXT[Jfiddle Screencapture][1]
</P>
爲什麼額外此代碼後。風格標籤之前和之後? –
不要在class =「」之間有空格,這可能對你有幫助 – MasterT
我不確定如何在網站的文本框中輸入代碼,而不會變成代碼大聲笑!我想出了CTRL + K我認爲。立即嘗試您的建議,馬上回來! – Hroki702