活动按钮不应在悬停时更改颜色

时间:2019-06-26 16:11:28

标签: html css bootstrap-4

我已经分别设置了悬停和活动功能,当我将鼠标悬停在导航菜单上时,颜色会改变

/* Change the color of links on hover */
nav .nav > li > a:hover {
  background-color: peachpuff;
  color: black;
}

/* Add a color to the active/current link */
.active {
  background-color: darkslategray;
  color: snow;
}
<nav>
  <ul class="nav navbar-nav menu">
    <li class="active"><a href="#Fashion">Fashion</a></li>
    <li><a href="#StyleHunter">StyleHunter</a></li>
    <li><a href="#Lifestyle">Lifestyle</a></li>
    <li><a href="#Celebrity">Celebrity</a></li>
    <li><a href="#Videos">Videos</a></li>
    <li><a href="#Interviews">Interviews</a></li>
  </ul>
</nav>

栏,同时更改了设置为活动菜单的颜色。但是当我将鼠标悬停在活动按钮上时,它的颜色也会从活动变为悬停。我该如何停止?

2 个答案:

答案 0 :(得分:0)

尝试此CSS代码

artisan cache:clear

我希望它能为您

答案 1 :(得分:0)

尝试:

$entityManager = $this->getDoctrine()->getManager();
$entityManager->persist($testEntity);
$entityManager->flush();