图像按钮导航到另一个站点html/css
这是我的代码: HTML:图像按钮导航到另一个站点html/css,html,css,Html,Css,这是我的代码: HTML: 应该发生的是,它显示一个图像,当我点击时,它将导航到另一个本网站index2.html。它与另一个图像一起工作,但它有一个恼人的边框,但在我更改图像后,它不再工作 您不需要输入类型按钮,只需使用img html: 您不需要输入类型按钮,只需使用img html: <a href="index2.html"> <input type="image" class="button" value=""> </a> .bu
应该发生的是,它显示一个图像,当我点击时,它将导航到另一个本网站
index2.html
。它与另一个图像一起工作,但它有一个恼人的边框,但在我更改图像后,它不再工作 您不需要输入类型按钮,只需使用img
html:
您不需要输入类型按钮,只需使用img html:
<a href="index2.html">
<input type="image" class="button" value="">
</a>
.button {
background:url(example.jpg) no-repeat;
cursor:-webkit-grab;
border: none;
}
<a href="index2.html">
<img src="example.jpg" />
</a>
a img {
border: none;
cursor: grab;
}