<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
我是 php(和一般代码)的新手,遇到了一个问题..
我正在为我的网站使用 WordPress,我正在尝试更改 banner 中的文本颜色在页面顶部。我可以在 WordPress 中执行此操作,但是每当我这样做时,它都会在主菜单上四处移动文本。不知道为什么会这样。
所以我要么在 WordPress 中寻找解决此问题的方法,要么更简单的方法是仅更改 .php 页面中的字体颜色。
任何帮助将不胜感激
编辑*
不完全确定这个问题的哪一部分是题外话,因为它完全是关于一个主题:How to change the color of the text within a banner, within wordpress..Whether that is through wordpress itself, or the back -结束,我不在乎。无论如何都能完成工作。
无论如何,here是网站的链接,下面是 style.css 页面。
如果这还不够好,并且需要“main.min.css”,请告诉我
@import 'layout/css/main.min.css';
#menu-item-27 span {color: #000;}
#contact-front{
border: 0px !important;
color: #fff !important;
text-align: center !important;
}
#contact-contact{
border: 0px !important;
color: #000 !important;
text-align: center !important;
}
#contact-us-page .section-content .wpcf7-form p .wpcf7-textarea {
color: #fff !important;
}
最佳答案
这是因为您使用的是 p 标签,它可能有填充/边距。
您可以将其替换为<span style="color:black">Training</>
,但这不是设置元素样式的最佳方式。
将以下 css 添加到您的 style.css
#header .top-header .header-navigation ul li.menu-item-has-children a {
padding-right: 0;
position: static;
}
#header .top-header .header-navigation ul li { padding-right: 16px }
#header .top-header .header-navigation ul li.menu-item-has-children a:after { top: -2px; }
关于php - 在 wordpress 或 php/css 中更改横幅文本颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38444535/