Current position: home page > Website design >Solution to nth child incompatibility in low version IE

Solution to nth child incompatibility in low version IE

Author: blueleaf Classification: Website design Time: June 10th, 2015 Browse: 18505 Comments: 6

It is well known that nth child is an attribute of CSS3, which is supported in browsers that support CSS3, but not in the lower version of the wonderful IE browser. In order to make the lower version of IE also support the nth child selector of CSS3, we can use jquery See the following code:

 .list li:nth-child(4n){margin-right:0;} In this way, direct writing can only be displayed normally in browsers that support CSS3. $(document).ready(function(){ $(".list li:nth-child(4n)"). css ("margin-right","0"); }); Write in jquery, and it will be displayed well in IE browser.

Disclaimer:

Website: Click Copy to share with friends!

All content resources shared by this website, if not noted, are original by Blueleaf. If you need to reprint, please indicate the source; Please contact us in case of infringement Contact handling Please understand!

Comment List
 blink the eyes kiss Growl happy think poor It's embarrassing Grievance ha-ha hush Right hum Zuo Hum Hum doubt A bad laugh Make money Sadness Be cool Seduce fierce handshake yeah Hee hee Shyness applause greedy Madness Embrace gather and watch Mighty awesome
Submit comments

Clear information
Close Comment
 Big monster
Big monster tourist
#4
Not compatible
2017-03-24 14:14 reply
 blueleaf
blueleaf tourist
@Big monster: it needs to reference the JQUERY library file.
2017-04-02 08:21 reply
 Li Si
Li Si tourist
#3
It doesn't seem to work. It's not compatible, Schmida.
2016-09-19 16:17 reply
 blueleaf
blueleaf tourist
@Lisa: You need to reference the jquery library.
2016-09-21 13:04 reply
 Xiao Fan
Xiao Fan tourist
#2
Very good. Write it down first!
 Code content
2015-08-29 14:12 reply
 Kou Yuxin's Blog
Kou Yuxin's Blog tourist
#1
Yes, I have
2015-06-13 11:52 reply
music appreciation
Back to top