【发布时间】:2017-06-02 12:53:20
【问题描述】:
下面是我的代码。当我将鼠标悬停在搜索按钮上时,我将获得文本更改效果。我保持按钮背景相同,只是在悬停时尝试更改文本的颜色。我不确定我错过了什么。有没有更简单的方法来实现这一点?该按钮仅保持悬停前的颜色。我没有想法。
.header_search #search-submit {
width: 80px;
height: 35px;
margin: 0 -83px 0 0;
background: #ff9105;
border: 2px solid black;
border-left: none;
font-size: 14px;
color: #008b95;
-webkit-border-radius: 0 5px 5px 0;
border-radius: 0 5px 5px 0;
}
{{ trans_fast }}
.header_search #search-submit:hover {
background: #ff9105;
color: white
}
【问题讨论】:
-
您的 CSS 语法不正确。缺少分号和
{{ trans_fast }}是什么?