如何使div成为可链接的按钮 [英] How to make div a linkable button
问题描述
I am new in html and i wanna ask how to put a link for the button
我是新来的html,我想问如何为按钮设置链接。 b class =tp-caption RotatingWords-Button rev-btn rs-parallaxlevel-0
id =slide-333-layer-7
style =z-index:11; white-space :nowrap; outline:none; box-shadow:none;
box-sizing:border-box; -moz-box-sizing:border-box;
-webkit-box-sizing:border-box ;>
< a href =index.html> ENTER< / a>
< / div>
<div
class="tp-caption RotatingWords-Button rev-btn rs-parallaxlevel-0"
id="slide-333-layer-7"
style="z-index: 11; white-space: nowrap;outline:none;box-shadow:none;
box-sizing:border-box;-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;">
<a href="index.html">ENTER</a>
</div>
现在如何完成链接工作仅适用于文本ENTER
how its done right now the link its working only for the text "ENTER"
推荐答案
你可以用任何你喜欢的方式来设置它的样式,但是为了创建一个div链接,下面是一个例子:
You can style it any way you like, but to make a div a link, here is a sample:
<div id="mylink" onclick="window.location.href='index.html';" style="padding:10px;border:1px solid black;max-width:100px;text-align:center;cursor:pointer;">Enter</div>
这篇关于如何使div成为可链接的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!