我不确定为什么,但是有一条小线将这些按钮连接在一起。有人知道让它消失的 css 吗?
<div class="button">
<a href="registerFacebook.php"> <button> Register with <br> facebook </button> </a>
<a href="register.php"> <button> Make a new account </button> </a>
</div> <!--end of div button-->
.button{
text-align:center;
}
非常感谢:)
最佳答案
这是链接的默认下划线。您看到的线条实际上是由于按钮末尾和链接标记末尾之间的空格所致。
</button> </a>
将其更改为:
<div class="button"><a href="registerFacebook.php"><button> Register with <br /> facebook </button></a>
<a href="register.php"><button> Make a new account </button></a>
</div>
关于html - 彼此相邻的按钮由随机线链接。我该如何摆脱它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21740327/