div之外的链接标记会导致空格

时间:2017-01-15 21:34:20

标签: html css hyperlink sass

我在链接中附加div时遇到问题。我希望它们全部连接,底部没有空白空间。我发现这是一个<a>标记问题。

以下是我的codepen链接和显示问题的图片:

http://codepen.io/Felnyr/pen/WRGRyQ

来自Inspector的图片:

enter image description here

1 个答案:

答案 0 :(得分:0)

我用笔看到了两个问题。

  1. 在JS中,您在第9行// setTimeout 0 times with ab test Concurrency Level: 500 Time taken for tests: 53.824 seconds Complete requests: 100000 Failed requests: 0 Total transferred: 9000000 bytes HTML transferred: 1500000 bytes Requests per second: 1857.90 [#/sec] (mean) Time per request: 269.121 [ms] (mean) Time per request: 0.538 [ms] (mean, across all concurrent requests) Transfer rate: 163.29 [Kbytes/sec] received // setTimeout 50ms response times Concurrency Level: 500 Time taken for tests: 23.174 seconds Complete requests: 100000 Failed requests: 0 Total transferred: 9000000 bytes HTML transferred: 1500000 bytes Requests per second: 4315.12 [#/sec] (mean) Time per request: 115.872 [ms] (mean) Time per request: 0.232 [ms] (mean, across all concurrent requests) Transfer rate: 379.26 [Kbytes/sec] received 之后错过了双引号。
  2. 要修复底部边距问题,您只需将父线路框的行高更改为0.
  3. 像这样:

    href=\"#\

    这解决了所有响应断点的问题。

    保持文本格式正确。你可以使用负底边距,但这可能不是完全跨浏览器兼容(特别是一些Android浏览器似乎有麻烦)。您可以将.channelBoxes line-height: 0 添加到.Box css。