如何利用CSS给同一个网页中的超链接设置设置不同的样式?
生活随笔
收集整理的這篇文章主要介紹了
如何利用CSS给同一个网页中的超链接设置设置不同的样式?
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
用css中的類。比如<style type="text/css">
a.topcs:link {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a.topcs:visited {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a.topcs:hover {
font-size: 12px;
color: #FF0000;
text-decoration: none;
}
a.news:link {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a.news:visited {
font-size: 12px;
color: #000000;
text-decoration: none;
}
a.news:hover {
font-size: 12px;
color: #FF0000;
text-decoration: none;
}</style>
調用 <a href="1.html" class="news">1</a><a href="2.html" class="topcs">1</a>
總結
以上是生活随笔為你收集整理的如何利用CSS给同一个网页中的超链接设置设置不同的样式?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 淇 奥
- 下一篇: Linux开机启动顺序