链接到完整的div - html和css [英] Link into full div - html and css

查看:118
本文介绍了链接到完整的div - html和css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.sliderPart {   
    width: 25%;
    height: 100%;
}

.sliderPart a {
    display:block;
    position:relative;
    text-decoration:none;
    height: 100%;
    font: 1.3em  Arial, Sans-serif;
}  

如何让所有div区域的链接可点击?

How can I make my link clickable for all div-area?

推荐答案

将链接放在div之外。您可以使锚标记的行为类似于div。就像你在你发布的css中做的那样。

Put the link outside the div. You can make an anchor tag act similarly to a div. Like you're doing in the css you posted.

这篇关于链接到完整的div - html和css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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