這裏的CSS簡單的CSS問題
.box {
background-color: #CCCCCC;
}
.box-title {
font-size: small;
font-weight: bold;
color: #000000;
background-image: url(/icons/bg.png);
background-repeat: repeat-x;
}
.box-content-container {
background-color: #FFFFFF;
}
a:link {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
color: #000000;
}
a:active {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
color: #000000;
}
a:hover {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: underline;
color: #000000;
}
a:visited {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
color: #000000;
}
a.tag18:link {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
}
a.tag18:hover {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
text-decoration: underline;
}
a.tag18:visited {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
}
a.tag18:active {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
}
和HTML
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="box">
<tr>
<th class="box-title-header" scope="col">Categories </th>
</tr>
<tr>
<td class="box-content-container">
<div align="center">
<a class="tag18" href="http://www.site.com">Category 1</a>
</div>
<p> </p>
</td>
</tr>
</table>
問:爲什麼字體大小不顯示爲18像素高,如CSS定義?
編輯:
我想創造最超鏈接一個CSS樣式。我相信這是一個實現:鏈接
對於您可以創建.style1其他樣式...
問題
可以一:STYLE1:鏈路上與存在嗎?這似乎是:鏈接覆蓋了風格。
回答
一:鏈路覆蓋任何a.pseudo級。對於多種樣式使用:鏈接,則額外的超鏈接樣式需要'.classname a:link'這可以通過[span class ='classname']在HTML中實現。
這似乎適用於我...你得到什麼...? – 2010-07-20 22:53:22
不需要:鏈接...只需使用'a'。如果你想讓某個鏈接以某種方式查看,只需使用一個類。 {}將覆蓋任何東西,除非你指定一個類 .className {} – st4ck0v3rfl0w 2010-07-21 04:43:17