Learn

The forum of documents and methods for studying - Lượm lặt kiến thức


    (CSS) Code to Highlight Links on MouseOver

    avatar
    congdantoancau

    Tổng số bài gửi : 633
    Tiền xu Ⓑ : 1732
    Được cảm ơn № : 27
    Ngày khởi sự Ngày khởi sự : 12/05/2014

     (CSS) Code to Highlight Links on MouseOver Empty (CSS) Code to Highlight Links on MouseOver

    Bài gửi by congdantoancau 19th June 2015, 05:15

    The default style in most browsers for a link can be described as follows:


    Code:
    a:link {
      color: blue ;
      background-color: transparent ;
      text-decoration: underline ;
    }

    The a:link portion basically indicates that the block following, enclosed in the curly brackets, is to be applied to links. Each line in the block gives a rule. The line beginning color tells the browser that the anchor text of the link is to be blue. The "transparent" value given to background-color means that whatever was in the background will be visible underneath the link text (including its existing colour). The text-decoration value of "underline" causes the browser to render the text with an underline.

    To style the link when the mouse is hovering over it, simply add rules for a:hover. Take the following for example.


    Code:
    a:hover {
      color: black ;
      background-color: #def ;
    }

    or


    Code:
    /* hover link styles */
    a:hover {
      text-shadow:1px 0 10px #01A9DB;
      text-color: #069;
      font-size: 16px;
      font-weight: bold;
      font-style: italic;
    }



    wsck.forumotion.com


      Hôm nay: 25th November 2024, 10:10