【发布时间】:2021-05-19 16:17:19
【问题描述】:
我无法让悬停在我的按钮上工作。我希望我的按钮没有边框,但是当我的鼠标在它上面时显示一个蓝色边框。当鼠标不在顶部但已排序时,我还需要它来更改图像,因此 changeImage 函数:)。只是需要边界方面的帮助,有什么建议吗?
HTML
<input type="button" class = "button" onclick="changeImage('https://www.trafalgar.com/real-word/wp-content/uploads/sites/3/2019/10/giant-panda-750x400.jpg')" onmouseover="changeImage('https://www.trafalgar.com/real-word/wp-content/uploads/sites/3/2019/10/giant-panda-750x400.jpg')" value="Panda"
/>
CSS
.button {
margin-right: 20px;
width:300px;
height:300px;
background-color: transparent;
border:none;
.button:hover {
border:2px solid #0000ff;
border-radius: 20px;
}
【问题讨论】:
-
你忘记了
}的结尾.button
标签: html css button hover border