我正在尋找將一個默認類添加到一堆鏈接。因此,而不是向一組鏈接添加默認類
<a href=1 class=text1>1</a>
<a href=2 class=text1>2</a>
<a href=3 class=text1>3</a>
<a href=4 class=text1>4</a>
<a href=5 class=text1>5</a>
<a href=6 class=text1>6</a>
<a href=7 class=text1>7</a>
我想做
<span class=text1>
<a href=1 >2</a>
<a href=2 >3</a>
<a href=3 >4</a>
<a href=4 >5</a>
<a href=5 >6</a>
<a href=6 >7</a>
<a href=7 >8</a>
</span>
在文本1類是一樣的東西:
a.text1:link { color: white; text-decoration: underline ;}
a.text1:active { color: white; text-decoration: underline ;}
a.text1:visited { color: white; text-decoration: underline ;}
a.text1:hover { color: white; text-decoration: underline ; }
第二個選項似乎但是並沒有工作。我是愚蠢的嗎?還是有什麼辦法可以像這樣在一個小組中製作一堆鏈接?