我不明白你的目标是什么?
a是一个文本链接,而button是一个HTML元素,两者都会将您发送到某个地方。你为什么要把它们混在一起?
btn的一个类非常通用,以至于许多web开发人员用它来设计整个品牌,然后用id为每个品牌添加风格
如果这确实是一个特殊的按钮,请尝试在css中使用#id。
<form>
<a href="https://www.google.com" class="wrapper"><span>some content</span></a>
<button type="submit" class="btn" id="special_button" formaction="https://www.yahoo.com" >
</form>
#special_button {
-webkit-transition-duration: 0.4s; /* Safari add all the browsers your targeting */
transition-duration: 0.4s;
}
#special_button:hover {
background-color: #4CAF50; /* Green */
color: white;
}