The special effects that CSS produces

Source: Internet
Author: User
CSS often have friends ask: How to make a hyperlink text does not appear underline, how to make the mouse to move to the hyperlinks on the effect of discoloration? In fact, these traditional methods can not be done. The use of CSS control can be very easy to do, and the page code is not bloated.

★ First Look at the hyperlinks without underlining the example:

Example 1: This connection can go to the bottom of the page, but there is no underline.

How did this happen? In and between and plus the following CSS syntax control:

If you want to create a discoloration effect, you need to use another property, this is hover, look at the following code.

a:hover {Text-decoration:none Color:yellow} indicates that the text decoration style is "none" (that is, no underline) when the mouse is moved to the connected text, and yellow is displayed.

a:hover {Text-decoration:underline Color:green} indicates that the text decoration style is "underline" (that is, underlining) while the mouse is moving to the connected text, and green is displayed.

★ Extension: If we use the following 2 attributes at the same time, what effect will it have?


a:link {text-decoration:none; color:yelloe; font-size:9pt}

a:hover {text-decoration:underline; color:green; font-size:12pt}

The connection text is not underlined, the yellow display, the 9pt size. The mouse moves to the connection when the underline, the color is green, character size 12pt. Is it discolored? and the font due to the size of the change, there is a dynamic, it seems to expand all of a sudden.

In a word, all the methods mentioned above should be used synthetically.

★ Note: Not all of the browsers support all the option attributes. Test yourself on multiple browsers.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.