如何使用CSS删除WordPress模板页脚处的自带水印
你之前的代码footer p designed-by 会被识别为匹配footer内p标签下的<designed-by>自定义标签,而非类名为designed-by的元素,缺少类选择器必备的.前缀,因此无法生效,调整方案如下:
方案1(p标签自带designed-by类时使用)
footer p.designed-by { display: none !important; }
方案2(designed-by是p标签内部子元素的类时使用)
footer p .designed-by { display: none !important; }
将调整后的代码粘贴到WordPress后台「外观」-「自定义」-「额外CSS」输入框,保存设置后清理站点缓存即可生效。添加!important是为了覆盖模板原有样式优先级,避免规则被默认样式覆盖。
内容的提问来源于stack exchange,提问作者kilian
相关产品推荐
相关产品推荐

