如何使div成为可链接的按钮 [英] How to make div a linkable button

查看:84
本文介绍了如何使div成为可链接的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆