<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
我对编程并不陌生,但是网页设计无论如何都不是我的强项。我目前正在使用 Dreamweaver 设计网站。在站点上,当按下按钮时,它处于事件状态。当我按下另一个按钮(例如“关于”)时,它会将您带到另一个页面(这是该页面的修改副本),但是即使我在“关于”页面上,“主页”按钮仍保持事件状态。下面的这个 CSS 脚本是否分配给了某处的特定按钮?如果它被分配,什么样的文件/它的位置是什么,以便我可以更正它。谢谢。
ul.navlink li a.active{
float:left;
padding:0 23px;
color:#000000;
background-color:#98AFC7;
display:block;
border-left:solid 2px #6D7B8D;
border-right:solid 2px #6D7B8D;
width:auto;
cursor:text;
}
最佳答案
如果你张贴一些图片会更好,但我会尽力提供帮助。
在我看来,您所说的是导航菜单。许多网站“激活”链接,让用户知道它是什么页面。
通常,他们有一个导航链接的 css 规则和导航中事件链接(类)的另一个规则。
所以,如果您查看“home”链接的 html,您可能会在上面找到一个类或 ID,女巫可能被命名为“active”。您所要做的就是将其删除。
ul {
list-style-type: none;
}
a {
text-decoration: none;
color: black;
}
#active {
color: grey;
}
<html>
<head>
<title>Active nav</title>
</head>
<body>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#" id="active">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</body>
</html>
关于html - Css 按钮激活,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36075252/