我無法準確定位一段CSS文件來格式化HTML文件的一部分。將CSS協調爲HTML
我試圖讓tagline
部分以綠色呈現,但是它呈現爲紅色。
這告訴我,這些樣式基於CSS的主體塊應用於本節。我如何獲得CSS tagline
塊以應用於HTML的tagline
部分?
這裏是HTML縮小:
<body>
<div id='container'>
<main>
<tagline>
bunch of text
</tagline>
</main>
</div>
</body>
這裏是CSS的相關部分: @CHARSET 「UTF-8」;
body, h1, h2, h3, h4, h5, h6, p, ul, dl, ol, form, fieldset, input, label, table, tbody, tfoot, th, tr, td, textarea, select
{
font-family: "Century Gothic", CenturyGothic, Geneva, AppleGothic, sans-serif;
font-weight: normal;
color: red;
font-size: 12px;
}
#container {
width:1280px;
}
// blue #5E91A8 <--these lines seem to be the problem!
// green #C1D82F
tagline {
font-family: "Century Gothic", CenturyGothic, Geneva, AppleGothic, sans-serif;
font-weight: normal;
font-size:16px;
color:green;
}
'字體color'不存在,請使用'color' – user3790069
應該是顏色,而不是字體顏色。 – Chad
謝謝,但所有這些都錯過了標記。這不僅僅是顏色(我在帖子中改變了)。這是事實,我的CSS不匹配HTML文件的該部分。 – Alex