chrome,ff浏览器默认行高不同,需要初始化。
chrome下是16px ff是18px
设置不同行高,auto、18px 16px
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
391 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Document</title> 6 <style> 7 ul,li{ 8 margin: 0; 9 padding: 0; 10 } 11 h6{ 12 font-size: 16px; 13 border-bottom: 1px solid #ccc; 14 margin: 10px 0; 15 height: 18px; 16 line-height: auto;/* 18px,16px */ 17 } 18 ul{ overflow: hidden;} 19 li{ 20 border: 1px solid #ccc; 21 border-bottom: none; 22 z-index: 103; 23 font-size: 14px; 24 float: left; 25 list-style: none; 26 margin-right: 20px; 27 padding: 10px; 28 } 29 </style> 30 </head> 31 <body> 32 <h6>前端之路<ul > 33 <li ><a href="#">我的前端之路</a></li> 34 <li ><a href="#">我对前端的理解</a></li> 35 <li ><a href="#">有趣的标签</a></li> 36 <li ><a href="#">奇怪的问题</a></li> 37 </ul></h6> 38 </body> 39 </html>
转载于:https://www.cnblogs.com/snowinmay/archive/2013/05/12/3073937.html
最后
以上就是矮小钢铁侠最近收集整理的关于chrome,ff浏览器默认行高的全部内容,更多相关chrome内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复