Application of expression in CSS

Source: Internet
Author: User

In the CSS,<!--startfragment-->expression can customize the properties, use this property, you can easily control the display of page elements, the following example is to let the link and the normal text display, and when clicked does not trigger the href attribute jump.

<style>

. linkdisable {color:black; Text-decoration:none;zhsp1029:expression (This.onclick=function () {return false})}

</style>

<body>

<a href= "blog.111cn.net/zhsp1029" class= "linkdisable" > Dairy cows </a>

</body>

Explain:

Color:black; Set text color to Black

Text-decoration:none not underlined

Zhsp1029:expression (This.onclick=function () {return false} set link does not trigger event when clicked

Where zhsp1029 is the custom property name, expression (This.onclick=function () {return false} sets the link behavior when the mouse clicks

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.