jquery browser CSS3 Close-up compatibility instance _jquery

Source: Internet
Author: User

This example describes the jquery browser CSS3 feature-compatible approach. Share to everyone for your reference. The specific analysis is as follows:

CSS3 fully absorbed many years of web development needs, absorbing a lot of novel features. such as Border-radius

One of the most exciting features of CSS3 is the enhancement of selectors, for example, a property selector can select a tag based on a property value, and a location selector can select a tag based on the position of the child element.

Many of the browsers currently in use, such as IE7, mainly support CSS2. Most property selectors are not ideal.

It's because of the browser's compatibility issues with CSS3. Each browser does not have better standard support for it.

jquery is programmed by pre-JavaScript to provide a selector for almost all CSS3 standards. Developers can use these selectors to easily select a variety of elements. For use in JavaScript programming.

Copy Code code as follows:
<script type= "Text/javascript" >
$ (function () {
$ ("Li:nth-child (2)"). AddClass ("Altcss");
});
</script>

The above use selector Li:nth-child (2) to indicate the second element tag in selection <li>. And you can test the pass in the IE7 and Chorme browsers.

I hope this article will help you with your jquery programming.

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.