gpt4 book ai didi

jquery - 用于旧浏览器的 jquery 中的第 nth-child(4n)

转载 作者:太空宇宙 更新时间:2023-11-04 14:29:27 25 4
gpt4 key购买 nike

此代码在所有浏览器中都能正常工作,但在 Internet Explorer 和旧版浏览器中不起作用。对于旧的浏览器和 Internet Explorer 也可以使用 jquery 来实现吗?

.post {position:relative;float:left;width:207px;height:300px;margin-right:24px}
.post:nth-child(4n) {margin-right:0px !important;}

最佳答案

可以。在 jQuery 中,尝试

$(".post:nth-child(4n)").css('margin-right', '0px !important');

关于jquery - 用于旧浏览器的 jquery 中的第 nth-child(4n),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19283505/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com