排除缘我有这样的jsfiddle:https://jsfiddle.net/96urhqcz/利润率链接 - 需要从链接区域
有连续4个格 - 的HTML看起来像这样:
<div class="g-1-4 app">
<a style="text-decoration:none;" href="https://link1/">
<div style="margin:10px; padding: 30px 0px; background:#E74C3C" class="app">
<i class="fa fa-3x fa-comments-o" width="50%" style="display:block; margin:auto" src="/static/launcher/comments-o"></i>
Link Number 1
</div>
</a>
</div>
<div class="g-1-4 app">
<a style="text-decoration:none;" href="https://link2/">
<div style="margin:10px; padding: 30px 0px; background:#9D55B8" class="app">
<i class="fa fa-3x fa-paper-plane" width="50%" style="display:block; margin:auto" src="/static/launcher/paper-plane"></i>
Link Number 2
</div>
</a>
</div>
<div class="g-1-4 app">
<a style="text-decoration:none;" href="https://link3/">
<div style="margin:10px; padding: 30px 0px; background:#3395DD" class="app">
<i class="fa fa-3x fa-street-view" width="50%" style="display:block; margin:auto" src="/static/launcher/street-view"></i>
Link 3
</div>
</a>
</div>
<div class="g-1-4 app">
<a style="text-decoration:none;" href="https://link4/">
<div style="margin:10px; padding: 30px 0px; background:#00838F" class="app">
<i class="fa fa-3x fa-line-chart" width="50%" style="display:block; margin:auto" src="/static/launcher/line-chart"></i>
Link 4
</div>
</a>
</div>
的CSS的G-1-4是这样的:
.g-1-4{
width: 25%;
}
正如你可以在看的jsfiddle - 框之间的空间被“链接”到相应的框。
最终我试图有一个4横跨布局,但有边距不是链接。当用户将鼠标放在两个盒子之间时,我希望它是一个没有可点击性的普通鼠标。
我确定这是一件非常简单的事情,我很想念 - 但我似乎无法纠正它。
任何想法或想法?
你的问题是,你必须在左侧和右侧,这就是为什么你的链接都是围绕“真实”的div花费的原因填充。考虑使用余量而不是填充。 –
我确实在边缘有10px的边距,但这似乎没有什么区别(如果您扩大边距并减少填充 - 边距区域仍然是链接的)。 – Hanny