【发布时间】:2021-09-21 15:11:32
【问题描述】:
HTML:
<div class="main-text">
<h2>Surface laptop Go</h2>
<p>Make the most of every day with our largerst surface laptop</p>
<button>
<span> Shop now </span>
<i class="fa fa-angle-right"></i>
</button>
</div>
CSS:
.main-text button {
padding: .8rem 1.5rem;
border: none;
background-color: #000;
color: #fff;
cursor: pointer;
}
.main-text span:hover{
border-bottom: 2px #fff solid;
}
我不知道如何在鼠标悬停时移动两个元素之间的中间空间。参考:https://www.microsoft.com/shop now按钮
【问题讨论】:
-
您问了两个不同的问题。你想回答哪一个?提示:这不是你在标题中写的。
标签: html css button css-animations mousehover