简体   繁体   English

如何更改 wordpress 主题 css

[英]how to change the wordpress theme css

I have a problem with my wordpress theme.我的 wordpress 主题有问题。 an web developer has customised the theme. web 开发人员自定义了主题。 Now i want to edit this theme, aspecially the <a tag.现在我想编辑这个主题,特别是 <a 标签。 so I did;所以我做了;

I edit the extra CSS inside my theme with;我在我的主题中编辑了额外的 CSS ;

#a{
  color: #4c4c4c;
}

#a:link{
  color:#4c4c4c;
}

#a:visited{
  color:#4c4c4c;
}

#a:hover{
  color: #4c4c4c;
}

#a:active{
  color: #4c4c4c;
}

#a:focus{
  color:#4c4c4c;
}

the hover color that this developer has changed has now go to the #4c4c4c color.该开发人员更改的 hover 颜色现在已将 go 更改为 #4c4c4c 颜色。 but the color when you're no hovering is still the color this developer has set.但是你没有悬停时的颜色仍然是这个开发者设置的颜色。

do anyone knows how i can change this??有谁知道我怎么能改变这个?

You don't address <a> tags using #a {... } as a selector – #a would be the selector for an element that has "a" as its ID , like <p id="a">... .您不能使用#a {... }作为选择器来处理<a>标记 - #a将是具有 "a" 作为其ID的元素的选择器,例如<p id="a">...

Links are simply addressed via a:link {... } in CSS, and all other variants (:visited, :hover, :active, :focus)链接通过 CSS 和所有其他变体 (:visited, :hover, :active, :focus) 中a:link {... }简单地寻址

Try like this:试试这样:

#a{
  color: #4c4c4c !important;
}

The ! important ! important ! important property in CSS means that all subsequent rules on an element are to be ignored, and the rule denoted by ! important CSS 中的! important属性表示元素上的所有后续规则都将被忽略,规则由! important ! important is to be applied. ! important的是要应用。 This rule overrides all previous styling rules -- the ! important此规则覆盖所有以前的样式规则 - ! important ! important property increases its priority. ! important属性增加其优先级。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM