【发布时间】:2021-07-28 05:07:14
【问题描述】:
我有一个在悬停时会上升的按钮。过渡时间应该是 1 秒,但它不起作用。代码如下:
<style>
#talk-to-us {
padding: 10px!important;
height: 43px!important;
width: 148px!important;
background-color: #0ee9f5!important;
display: inline-auto!important;
margin-right: 5px;
position: relative;
transition: top ease 1.0s; /*this is not working*/
}
#talk-to-us:hover {
top: -10px;
text-decoration:underline;
}
#link {
color: white!important;
font-size: 14px!important;
padding: 10px!important;
}
</style>
<button id="talk-to-us">
<b>
<a id="link" href="#">TALK TO US!</a>
</b>
</button>
知道可能是什么原因吗?
【问题讨论】: