css超連結式樣總覽

2009081304:41

 

CSS超連結樣式表:
為了突顯特殊效果,範例中的分隔線皆加粗顯示,複製了你喜歡的語法之後,請自行做下列幾項修改:
<style type="text/css">
<!--
a { text-decoration: none }      //宣告HTML連結消除底線
a:link {color:#ccccff}    //宣告連結顏色
a:visited {color:#ccccff}      //訪問過連結顏色
a:active {color:#ffcccc}       //執行中連結顏色
a:hover {color:#ffcccc}             //當滑鼠移到連結時連結顏色
-->
</style>

已上示範語法為網頁中使用

應用於部落格時須將下方粉色字刪除

<style type="text/css">
<!--

-->
</style>

按紐風格中框邊試樣值有以下幾種

邊框樣式 none(無邊框)
dotted(點線)
dashed(虛線)
solid(實線)
double(雙線)
groove(立體凹線)
ridge(立體凸線)
inset(立體嵌入線)
outset(立體隆起線)

a { color: #4D2078;text-decoration: underline; } a:hover{ color: #0000FF;text-decoration: underline } 預設連結
a { text-decoration : none; color:#4D2078; } a:hover{ text-decoration : underline;color:#9900CC; } 連結加底線
a { color: #4D2078; text-decoration: underline overline;} a:hover { color: #9900CC; text-decoration: none} 雙線連結
a { color: #4D2078; text-decoration: line-through} a:hover { color: #9900CC; text-decoration: none} 刪除線連結
a { border: 1px #A498BD solid; height: 16px; color: #4D2078} a:hover { border: 1px #0000FF dotted; height: 16px; color: #9900CC} 另類框線
a { border: #A498BD solid; height: 0px; color: #4D2078; border-width: 0px 0px 1px} a:hover { border:#7D1DBD solid; height: 0px; color: #9900CC; border-width: 0px 0px 1px; border-color: #00FF00 #00FF00 #605080 #605080} 設定底線顏色
a { color: #4D2078; font-size: 9pt; text-decoration: none} a:hover {font-size: 12px; color: #9900CC; position: relative; left: 1px; top: 1px; clip: rect( )} 設定底線距離
a { border: #A498BD solid; height: 0px; color: #4D2078; border-width: 0px 0px 1px; padding-bottom: 5px} a:hover { border: #605080 solid; height: 0px; color: #9900CC; border-width: 0px 0px 1px; padding-bottom: 2px} 設定底線長度和對齊方式
a { border: #A498BD solid; height: 0px; color: #4D2078; border-width: 0px 0px 1px; width: 200px; text-align: center} a:hover { border: #605080 solid; height: 0px; color: #9900CC; border-width: 0px 0px 1px; width: 170px; text-align: center} 雙底線加粗
a { border: #A498BD double; height: 0px; color: #4D2078; border-width: 0px 0px 3px} a:hover { border: #605080 double; height: 0px; color: #9900CC; border-width: 0px 0px 5px} 下壓按鈕連結
a { border: 1px #A498BD solid; color: #4D2078; clip: height; background-color: #EEEBFF; height: 20px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 130px: 0px} a:hover { border: 1px #605080 solid; color: #9900CC; clip: height; background-color: #BDAAE2; height: 20px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; width: 130px: 0px} 塊狀連結
a { color: #4D2078; PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; background-color:#EEEBFF; height: 20px; width: 120px; text-align: center; ; border: #A498BD; border-style: outset; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px} a:hover { BORDER-RIGHT: ##605080 1px outset; PADDING-RIGHT: 2px; BORDER-TOP: #605080 1px outset; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; BORDER-LEFT: #605080 1px outset; PADDING-TOP: 2px; BORDER-BOTTOM: #605080 1px outset;background-color:#BDAAE2; height: 20px; width: 120px; text-align: center; } 按鈕風格的連結
a { text-decoration : none; color:#4D2078; height: 20px; width: 130px; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px ; border: 1px #A498BD solid ; filter: Blur(Add=1, Direction=45, Strength=2) ; text-align: center } a:hover{ text-decoration : none; color:#9900CC ; height: 20px; width: 130px; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px ; border: 1px #BDAAE2 solid ; filter: Blur(Add=1, Direction=45, Strength=1) ; text-align: center } 特效連結
a { color: #4D2078; text-decoration: none; height: 20px; width: 120px; font-size: 12px; background-image: url(bg1.gif); padding-top: 6px; padding-left: 5px; text-align: center} a:hover { color: #9900CC; text-decoration: none; background-image: url(bg2.gif); height: 20px; width: 120px; padding-top: 6px; padding-left: 5px; text-align: center} 靜態背景切換連結
a { color: #4D2078; text-decoration: none; height: 20px; width: 120px; font-size: 12px; background-image: url(bg1.gif); padding-top: 5px; padding-left: 5px} a:hover { color: #9900CC; text-decoration: none; background-image: url(bg2.gif); height: 20px; width: 120px; padding-top: 5px; padding-left: 5px} 動態背景切換連結