line-height:2、line-height:2em、line-height:200%的区别
文章来源:
http://www.zhihu.com/question/20394889
总结:
1、line-height:2em、line-height:200%
根据父元素的字体大小计算行高
子元素继承父元素计算后的行高,如果子元素的字体很大,而父元素字体小,这样计算出来的行高有可能无法容量子元素的显示,会被截掉。
2、line-height:2(推荐)
根据子元素计算行高(取最大字体值*2)
line-height:2、line-height:2em、line-height:200%的区别的更多相关文章
- 【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.
idea启动测试类报错 Error running 'Test1.test': Command line is too long. Shorten command line for Test1.tes ...
- Error running 'xxx': Command line is too long. Shorten command line for xxx
跑单元测试时,报错如下: Error running 'xxx': Command line is too long. Shorten command line for xxx 解决方案: 在项目所在 ...
- IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line...
生命太短暂,不要去做一些根本没有人想要的东西.本文已被 https://www.yourbatman.cn 收录,里面一并有Spring技术栈.MyBatis.JVM.中间件等小而美的专栏供以免费学习 ...
- JS通过getBoundingClientRect获取的height可能与css设置的height不一致
发现如果DOM元素有padding-top或者padding-bottom值时, $(dom).height() = dom.style.display + padding-top + padding ...
- Ecshop出现问题 includes\lib_main.php on line 1329 includes\lib_base.php on line
php 5.3版本兼容问题不少,以上函数参数传递问题可以将lib_main.php on line 1329这句 $ext = end(explode('.', $tmp)); 改为 : $extsu ...
- d3.svg.line()错误:TypeError: d3.svg.line is not a function
var line_generator= d3.svg.line() .x(function (d,i) { return i; }) .y(function (d) { return d; }) 错误 ...
- offset[Parent/Width/Height/Top/Left] 、 client[Width/Height/Top/Left] 、 Element.getBoundingClientRect()
开篇提示:以下内容都经个人测试,参考API文档总结,但还是不能保证完全正确,若有错误,还请留言指出___________________________________________________ ...
- 转:Canvas标签的width和height以及style.width和style.height的区别
转自:http://www.cnblogs.com/artwl/archive/2012/02/28/2372042.html 作者:Artwl 背景 今天在博问中看到一个问题:用canvas 的 l ...
- 将一个文件中的内容,在另一个文件中生成. for line in f1, \n f2.write(line)
将一个文件中的内容,在另一个文件中生成. 核心语句: for line in f1: f1中的所有一行 f2.write(line) ...
随机推荐
- JMeter处理Cookie与Session
1.Cookie 添加方式:线程组-配置元件-HTTP Cookie 管理器,如下图: 2.Session 添加方式:线程组-前置处理器 -HTTP URL 重写修饰符,如下图: 有些tomcat的s ...
- JUnit4单元测试基础篇
引言 JUnit作为Java语言的测试框架,在测试驱动开发(TDD)下扮演重要的角色.众所周知,无论开发大型项目还是一般的小型项目, 单元测试都至关重要.单元测试为软件可发测试维护提供了很大的便利.J ...
- 东秦C#课设002-简单的文本编辑器
//加入的拖拽属性失败,dropenter声明方法待查. using System; using System.Collections.Generic; using System.ComponentM ...
- lua中string常用api
local a="abcdefgbbb" string.sub(a,1,3) 字符串截取 返回截取的字符串 print(string.sub(a,1,3)) ...
- Netty(6)源码-服务端与客户端创建
原生的NIO类图使用有诸多不便,Netty向用户屏蔽了细节,在与用户交界处做了封装. 一.服务端创建时序图 步骤一:创建ServerBootstrap实例 ServerBootstrap是Netty服 ...
- centos安装ganttproject
官网下载 http://www.ganttproject.biz/ 我的JAVA早已经安装了. 问题:root #ganttproject 提示org.bardsoftware.eclipsito.B ...
- IIS错误解决办法(HTTP Error 500.19 - Internal Server Error)
window10 切换登陆用户,VS2015的IIS Express 调试代码报HTTP Error 500.19 - Internal Server Error 错误,无法读取配置文件解决办法. I ...
- CUDA开发存储器运用(包括存储器之间的转存)
主机端内存(host memory) 主机端叶锁定内存(pinned memory) 显存 寄存器(register) 局部存储器(local memory) 共享存储器(shared memory) ...
- 设计模式 -- 代理模式 (Proxy Pattern)
定义: 为其他对象提供一种代理以控制对这个对象的访问: 角色: 1,抽象主题类,(接口或者抽象类),抽象真实主题和代理的共有方法(如下Subject类): 2,具体实现的主题类,继承或者实现抽象主题类 ...
- Unity3D脚本使用:Random
实例: 为集合变量赋值,并运行,点击按钮,运行结果如图