【发布时间】:2021-12-25 03:56:15
【问题描述】:
我想要的是在悬停时从上到下更改按钮的背景颜色。这个页面上有一个很好的例子http://tympanus.net/Development/CreativeButtons/ 这是我现在拥有的代码。谢谢
CSS
#button {
outline: 0;
margin: 20px 10px 10px 6px;
border-width:2.7px;
font-size: 25px;
border-style: solid;
font-family: 'PT Sans Narrow', sans-serif;
padding: 4px 40px;
background-color: white;
border-color: #0e83cd;
color: #0e83cd;
transition: all .3s ease-in;
}
#button:hover {
color: white;
background-color: #0e83cd;
transition: all .3s ease-in;
}
HTML
<button id="button" />Ask</button>
【问题讨论】:
-
您的 HTML 标记在哪里?还请用你目前所做的创建一个演示,以便我们查看。