不幸的是,我从两个边框创建了一个向上箭头按钮 它没有合并在一起,所以我可以看到边框是如何堆叠的 彼此,但他们应该像一个元素一样!
#myBtn {
//display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 999;
border: 10px solid #778293;
background-color: rgba(0, 0, 0, 0);
border-left: none;
border-top: none;
cursor: pointer;
width: 4vh;
height: 4vh;
transform: rotate(225deg);
transition: border-width 150ms ease-in-out;
}
#myBtn:hover {
border-bottom-width: 1em;
border-right-width: 1em;
}
<button onclick="topFunction()" id="myBtn" title="Go to top">My Button</button>
答案 0 :(得分:0)
#myBtn {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 999;
border: 10px solid #778293;
background-color: rgba(0, 0, 0, 0);
border-left: none;
border-top: none;
cursor: pointer;
width: 4vh;
height: 4vh;
transform: rotate(225deg);
transition: border-width 150ms ease-in-out;
}
#myBtn:hover {
border-bottom-width: 1em;
border-right-width: 1em;
}
&#13;
<button onclick="topFunction()" id="myBtn" title="Go to top">My Button</button>
&#13;