Trying to make a button clickable with HTML and CSS
This question already has an answer here:
.button {
font-size: 44px;
color: rgb(255, 255, 255);
background: rgb(0, 0, 0) none repeat scroll 0% 0%;
width: 64px;
height: 58px;
border-radius: 13px;
border-style: none;
}
<button class="button" onclick='location.href=""'>
<i class="fa fa-twitter"></i>
</button>
you are using #id
in css.but your html code you ussing .class..this create a problm.please remove the id and try to class..
try thiss code..Thanks
您只需添加一个onclick操作:
<button class="button" onclick='location.href="http://twitter.com"'>
<i class="fa fa-twitter"></i>
</button>
<button class="button" onclick="document.location.href='DemoPage.html'"> <i class="fa fa-twitter"></i></button>
链接地址: http://www.djcxy.com/p/36556.html
上一篇: 如何链接按钮?
下一篇: 尝试使用HTML和CSS来点击按钮