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!