把一个div变成一个链接 [英] Turn a div into a link
本文介绍了把一个div变成一个链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用google搜索了如何把div变成链接,但似乎有很多技术,其中没有一个看起来像在IE中能很好地工作。
将div转化为链接的最佳/最简单的技术是什么?
解决方案
为什么不使用锚标签并将其显示为块元素?
a {
display:block;
//此处剩余的代码
}
I googled how to turn a div into a link but there seem to be a lot of techniques, none of which seem like they would work well in IE.
What is the best/simplest technique for turning a div into a link?
解决方案
Why not use an anchor tag and display it as a block element?
a {
display: block;
//remaining code here
}
这篇关于把一个div变成一个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文