我已经阅读了所有关于此的帖子,但没有任何事情起作用,我被卡住了。
我试图隐藏几个 li 元素。这是网址:http : // Foundernest.com/submit-project/
我试图隐藏显示“Venture URL”的块
我试过了:
form.post li:nth-child(2){ display:none !important; }
但它没有用。
你对我能做什么有任何其他想法吗?
非常感谢。
尝试 :nth-of-type
#step-post li.form-group:nth-of-type(2){
display:none;
}
您的form元素混合了子元素(包括div和li),上面的示例选择了 2nd li。
li如果您想使用:nth-child选择器,您将需要计算表单的所有兄弟姐妹,而不仅仅是项目:
#step-post li:form-group:nth-child(7){
display:none;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句