如何使div标签可点击链接? [英] How to make div tag clickable link?
本文介绍了如何使div标签可点击链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何让div成为一个链接?我无法弄清楚。
我的代码看起来像这样
How to make div a link? I cant figure it out. my code looks like that
<div class="col-md-5 col-md-offset-4 kolLD"></div>
推荐答案
HTML 5指出 < a>元素
HTML 5 states that the <a>
element
可以包裹整个段落,列表,表格等等$
may be wrapped around entire paragraphs, lists, tables, and so forth, even entire sections, so long as there is no interactive content within (e.g. buttons or other links)
b
您可以用< a>
标签包装您的div标签。
You just can wrap your div tag with an <a>
tag.
<a href="#"><div class="col-md-5 col-md-offset-4 kolLD"></div></a>
这篇关于如何使div标签可点击链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文