通過html/css設定超連結字型顏色

來源:互聯網
上載者:User
超連結字型顏色設定是通過css來設定,a連結的顏色設定常用的有以下兩種,1、超連結a的初始狀態顏色,2、超連結字型的滑鼠滑過顏色,還有兩種病不常用:3、超連結字型的已訪問顏色

超連結字型顏色設定是通過css來設定,a連結的顏色設定常用的有以下兩種,1、超連結a的初始狀態顏色,2、超連結字型的滑鼠滑過顏色,還有兩種病不常用:3、超連結字型的已訪問顏色,4、超連結字型在按下滑鼠時的顏色

四中超連結狀態分別對應的css屬性:a{}、a:hover{} 、a:visited{}、a:active{},通常唯寫a{}、a:hover{}即可,如果你需要其他兩種字型顏色設定請參照一下順序來書寫

a{color:red;}a:visited{color:green;}a:hover {color:yellow;background:blue;}a:active {color:lime;background:red;}

這裡懶人建站放出一個其他字型顏色設定技巧:當文本在被選中時的字型和背景顏色(預設為藍底白字),通過下面的設定可以改變這種預設效果。

::-moz-selection { background:#d3d3d3; color:#555;}::-webkit-selection { background:#d3d3d3; color:#555;}::selection { background:#d3d3d3; color:#555;}/*文本選中以後的顏色*/
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.