我有一个用HTML和CSS创建的按钮,当它悬停在上面时会显示文本。我想要实现的是有一个过渡动画,因为我一直无法做到。
在HTML代码中,该按钮与链接(一个标记)一起工作。
希望他们能重现密码。我留下了一个指向网站的链接,这样你就可以完整地检查它:https://policies.esims.one/terms (按钮是第一个出现在页面上的)。
.back-button{
font-weight: bold;
letter-spacing: normal;
line-height: 100%;
text-align: center;
text-decoration: none;
border-radius: 0px;box-shadow: none;padding: 5px 30px 5px 5px;
color: #181818;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-size: 12px;
}
.back-button::before{
margin-right:10px;
background-image:url(https://mcusercontent.com/ec104f3d77537e1962ab6441c/images/d7bb4928-a156-4682-9677-d0d5b47c3a21.png);
background-size:40px 40px;
display:inline-block;
width:40px;
height:40px;
border-radius:50%;
content:""
}
.back-button:hover:after{
content:"Home"
}
.mcnButton{
transition:.4s;
border-radius:50px!important;
box-shadow:#999 0 0 20px 0!important;outline:none;
user-select:none
}
.mcnButton:focus{
background:#eceff9!important;
color:#181818!important
}<div style="display:flex;">
<a class="back-button mcnButton" href="https://www.example.com/" target="_self">
</a>
</div>
发布于 2020-08-09 06:28:14
你好,,我试着使用您的code --如果您使用您的代码,它将完美地工作:
<a class="back-button mcnButton" href="https://www.example.com/" target="_self"></a>隐蔽到:
<a href="https://www.example.com/" target="_self">
<button class="back-button mcnButton"><button></a>CSS中也没有变化。
https://stackoverflow.com/questions/63323076
复制相似问题