line-height:150% 和 line-height:1.5的区别
line-height:150%
是继承父元素的距离
line-height:1.5
是计算各子元素的距离
1、当line - height 为百分比时:
body{
font-size:14px; line-height:150%;
}
p{
font-size:21px;
}
结果就是:
body{
line-height:21px;//14*150%=21
}
p{
line-height:21px;//继承父元素
}
2、当line-height 为 X.X时:
body{
font-size:14px;
line-height:1.5;
}
.p1{
font-size:26px;
}
.p2{
font-size:21px;
}
结果就是:
body{
line-height:39px;//26*1.5 = 39
}
.p1{
line-height:39px;//26*1.5=39
}
.p2{
line-height:31px;//21*1.5 = 31.5(约等于31)
}
line-height:150% 和 line-height:1.5的区别的更多相关文章
- jquery的height()和javascript的height总结,js获取屏幕高度
jquery的height()和javascript的height总结,js获取屏幕高度 2014年9月18日 15048次浏览 引子 今天是九一八事变八十三周年,大家勿忘国耻!加油学习!经济和技术等 ...
- obj.offsetHeight与obj.style.height $(obj).height()与$(obj).css('height')
相同:都可以获取obj的高度区别:(1)obj.offsetHeight可以获取外部.内嵌和内联中定义的高,而obj.style.height只能获取内联中定义的高:(2)obj.offsetHeig ...
- canvas基础入门(一)canvas的width、height于css样式中的宽高区别
canvas的width.height于css样式中的宽高对画布的内容显示是有所区别的 1.在canvas标签下调用他的width和height,而且是没有单位的宽高,这种指定canvas大小的方法也 ...
- Bug整理——$(window).height()获取到$(document).height()的问题
想看解决方案不想看无聊乏味的bug解决过程的同学,请直接跳转到页面底部~ 今天在做项目的过程中遇到了一个BUG,项目中需要获取到浏览器客户区的高度以方便做一些适应性调整,代码如下: $(documen ...
- error: OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in cv::Mat::Mat
问题原因: You are probably working outside of the image dimensions. Does any of the values you pass to t ...
- How to Get Vertical Line from Point and Line
Description How to get vertical line cross one point which out of line in line. QPoint Line::Vertica ...
- Go to the first line OR the last line of the file
(1) 跳到首行 :1 或 gg (2)跳到最后一行 :$ 或 G 或shift+g(大写.当前若大小写锁定直接按g,未锁定则按shift+g)
- [gym102412D]The Jump from Height of Self-importance to Height of IQ Level
考虑使用平衡树维护该序列,操作显然可以用fhq treap的分裂+合并来实现 进一步的,问题即变为维护哪些信息来支持push up的操作(并判定是否存在$a_{i}<a_{j}<a_{k} ...
- CSS3学习笔记--line-height:150%与line-height:1.5的真正区别
代码: <div style="line-height:150%;font-size:16px;"> 父元素内容 <div style="font-si ...
- 利用canvas图片剪切
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <met ...
随机推荐
- hust1010 The Minimum Length
地址:http://acm.hust.edu.cn/problem/show/1010 题目: 1010 - The Minimum Length Time Limit: 1s Memory Limi ...
- Winter-2-STL-F Ananagrams 解题报告及测试数据
Time Limit:3000MS Memory Limit:0KB Description Most crossword puzzle fans are used to anagrams- ...
- VS 和 Eclipse 的一些快捷键记录
VS: 自动排版: Ctrl+K+F 选项卡之间的切换: Ctrl+Tab 统一缩进: Shift+Tab Ctrl + M + O: 折叠所有方法 Ctrl + M + L: 展开所有方法 Ecli ...
- win 7 64 安装 tensorflow
1:安装 python 3.5 2. 安装 pip 3: 安装 tensorflow 4,demo
- LigerUI ligerComboBox 下拉框 表格 多选无效
$("#txt1").ligerComboBox({ width: 250, slide: false, selectBoxWidth: 500, selectBoxHeight: ...
- 【c++ primer, 5e】函数匹配
练习 6.49 候选函数:与所调用的函数的名字相同的函数的集合. 可行函数:给候选函数加上参数数量.参数类型的约束所得到的函数的集合. 6.50 a 3.4可行,二义匹配 b 2.4可行,2是最佳匹配 ...
- web.py url传参及获取
第一种:直接获取: import web urls = ( '/(.*)','index' #URL后面必须加(.*) ) class index: def GET(self,name): print ...
- TCP/IP原理简述
TCP/IP与OSI TCP/IP工作在第4层,在TCP/IP协议簇中,有两个不同的传输协议:TCP(传输控制协议)和UDP(用户数据报协议),它们分别承载不同的应用.TCP协议提供可靠的服务,UDP ...
- 20145324 《Java程序设计》第3周学习总结
20145324 <Java程序设计>第3周学习总结 教材学习内容总结 第四章 1.要产生对象必须先定义类,类是对象的设计图,对象是类的实例,建立实例要用new 2.参数名称与对象数据成员 ...
- MySQL——修改数据表
1.添加单列: ALERT TABLE tbl_name ADD [COLUMN] col_name column_definition [FIRST|AFTER col_name 其中tbl_nam ...