国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
CSS制作多種鏈接樣式

CSS制作多種鏈接樣式

今天在#論壇有網(wǎng)友問起"同一頁面如何制作多種鏈接樣式",于是自己就隨手寫了一個:CSS制作多種鏈接樣式代碼,結(jié)果卻寫錯鳥,其實 多種鏈接樣式制作方法 挺簡單的,看看下面這個多種鏈接樣式制作方法的實例,你就明白了如何用CSS制作多種鏈接樣式了
<html>
<head>
<title>CSS制作多種鏈接樣式實例</title>
<style type="text/css">
<!--
a:link { color: #CC3399; text-decoration: none}
a:visited { color: #FF3399; text-decoration: none}
a:hover { color: #800080; text-decoration: underline}
a:active { color: #800080; text-decoration: underline}

a.red:link { color: #FF0000; text-decoration: none}
a.red:visited { color: #FF0000; text-decoration: none}
a.red:hover { color: #606060; text-decoration: underline}
a.red:active { color: #606060; text-decoration: underline}

a.ameth:link { color: #400040; text-decoration: none}
a.ameth:visited { color: #400040; text-decoration: none}
a.ameth:hover { color: #FF3399; text-decoration: underline}
a.ameth:active { color: #FF3399; text-decoration: underline}

div.other a:link { color: #004000; text-decoration: none}
div.other a:visited { color: #004000; text-decoration: none}
div.other a:hover { color: #008000; text-decoration: underline}
div.other a:active { color: #008000; text-decoration: underline}
-->
</style>
<!-- 鏈接樣式表 -->
</head>
<body>
第一種樣式(默認的) <a >個人日志</a> <br>
第二種樣式 <a class="red" >個人日志</a><br>
另外一種實現(xiàn)鏈接樣式的方法 <a class="ameth" >個人日志</a><br>
<div class="other">DIV容器實現(xiàn)鏈接樣式的方法 <a class="other" >個人日志</a></div><br>
</body>
</html>

 

當然,你完全可以將CSS代碼寫入一個CSS文件,這樣做的好處,不僅是你的網(wǎng)頁HTML代碼簡潔了,而且你會發(fā)現(xiàn)速度也跟著提升了,因為瀏覽器會緩存你的CSS文件,更重要的是你要改變樣式時只需要改變CSS樣式表文件就可以了

這樣寫
css樣式文件 default.css

a:link { color: #CC3399; text-decoration: none}
a:visited { color: #FF3399; text-decoration: none}
a:hover { color: #800080; text-decoration: underline}
a:active { color: #800080; text-decoration: underline}

a.red:link { color: #FF0000; text-decoration: none}
a.red:visited { color: #FF0000; text-decoration: none}
a.red:hover { color: #606060; text-decoration: underline}
a.red:active { color: #606060; text-decoration: underline}

a.ameth:link { color: #400040; text-decoration: none}
a.ameth:visited { color: #400040; text-decoration: none}
a.ameth:hover { color: #FF3399; text-decoration: underline}
a.ameth:active { color: #FF3399; text-decoration: underline}

div.other a:link { color: #004000; text-decoration: none}
div.other a:visited { color: #004000; text-decoration: none}
div.other a:hover { color: #008000; text-decoration: underline}
div.other a:active { color: #008000; text-decoration: underline}

現(xiàn)在,你只需要將CSS包含進你的HTML文件就可以了
index.htm

<html>
<head>
<title>CSS制作多種鏈接樣式實例</title>
<link rel="stylesheet" type="text/css" href="default.css">
<!-- 鏈接樣式表 -->
</head>
<body>
第一種樣式(默認的) <a >個人日志</a> <br>
第二種樣式 <a class="red" >個人日志</a><br>
另外一種實現(xiàn)鏈接樣式的方法 <a class="ameth" >個人日志</a><br>
<div class="other">DIV容器實現(xiàn)鏈接樣式的方法 <a class="other" >個人日志</a></div><br>
</body>
</html>
本站原創(chuàng),歡迎轉(zhuǎn)載,請注明出處: http://www.dayanmei.com/blog.php/ID_274.htm

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
css 定義連接樣式
超鏈樣式
學(xué)習(xí)代碼
標記語言
/module/xxgk/script/xxgk.css
CSS入門教程——鏈接(a)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服