Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何更改css“阅读更多”按钮_Html_Css_Wordpress - Fatal编程技术网

Html 如何更改css“阅读更多”按钮

Html 如何更改css“阅读更多”按钮,html,css,wordpress,Html,Css,Wordpress,我想通过添加鼠标悬停来更改“阅读更多”按钮样式。 我尝试了一些CSS,比如: a:hover{ background-color: #077fad; color: #ffffff; } 或 但第一种方法也发生了变化 /*将应用于页面上任何悬停的对象*/ .a:悬停{} /*应用于页面上悬停的 在给定的类组合中*/ .blmore.rmbutton-center.rmbutton-medium a:悬停{} /*应用于悬停对象中的任何对象 给定类组合的元素*/ .blmore.rmbut

我想通过添加鼠标悬停来更改“阅读更多”按钮样式。 我尝试了一些CSS,比如:

a:hover{
  background-color: #077fad;
  color: #ffffff;
}

但第一种方法也发生了变化

/*将应用于页面上任何悬停的对象*/
.a:悬停{}
/*应用于页面上悬停的
在给定的类组合中*/
.blmore.rmbutton-center.rmbutton-medium a:悬停{}
/*应用于悬停对象中的任何对象
给定类组合的元素*/
.blmore.rmbutton中心.rmbutton中位:悬停a{}

关键是两个类或元素之间的空格,它允许您表示标记的嵌套。

谢谢@Marvin。我尝试了所有的选择,但尼瑟的作品(没有任何变化)。“阅读更多”按钮部分是否可能没有Deafolt的悬停效果,这就是为什么公式不能应用于该部分?是否您的内联样式(您的
a
style
属性中的CSS)覆盖了要应用于悬停的a的样式?看这把小提琴来理解我的意思:是的,它是正确的!我已经检查了我的页面,这正是正在发生的事情。然后您需要删除内联样式,或者,如果不可能,添加`!与特定属性相关的重要信息。
div.blmore.rmbutton-center.rmbutton-medium:hover{
  background-color: #077fad;
  color: #ffffff;
}
<div id="bloglist_title">
    <h2 class="entry-title">
    <a href="my.website.link.com">Title</a>
    </h2>
</div>
<div class="entry-content">
    <div class="myleft">
    <a class="entry-post-thumbnail left" style etc.....></a>
<p>
Short text
</p>
<div id="bloglist_morebutton">
    <div class="blmore rmbutton-center rmbutton-medium">
        <a style="background-color: #fdc550; border-radius: 5px;"href="my.website.link.com">Read more</a>
    </div>
</div>
</div>
/* gets applied to any hovered <a> on the page */
.a:hover {}

/* gets applied to an hovered <a> on the page
   within the given class combination */
.blmore.rmbutton-center.rmbutton-medium a:hover {}

/* gets applied to any <a> within an hovered
   element of the given class combination */
.blmore.rmbutton-center.rmbutton-medium:hover a {}