请问我有手吗?我正在努力克服Wordpress Custom Fields Search插件中的CSS,该插件似乎对出现在窗口小部件和页面中的搜索框使用相同的样式。如果您查看http://www.landedhouses.co.uk/parties/,白色文本可通过小部件中的搜索框显示,但在页面上不可见。任何想法如何解决这一问题!?不幸的是,将此添加到页面的php没有实现任何内容:CSS搭配Wordpress插件
<h2>By size and price</h2>
<p style="color:000;"><?php if(function_exists('wp_custom_fields_search'))
wp_custom_fields_search(); ?></p>
非常感谢!
Oooh - 这只是工作:label.searchform-label {color:black;}然而,为什么呢工作?当然,小部件和页面都使用标签class = searchform-label?谢谢 – Edmund
因为label.searchform-label比.searchform-label更具体,所以值可以覆盖任何非重要的规则,就像{parent}> label.searchform-label将覆盖label.searchform-label中的规则,即对于更具体的选择器,规则将被使用的可能性更大 希望这有助于:) – Jamie