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 ...
随机推荐
- 19. Remove Nth Node From End of List(移除倒数第N的结点, 快慢指针)
Given a linked list, remove the nth node from the end of list and return its head. For example, Give ...
- cisco anyconnect linux
cisco anyconnect linux 官方的下载需要登录验证,比较麻烦,可以从这个地方直接下载使用.支持ubuntu,centos. cisco anyconnect vpn client我本 ...
- Glide Picasso和Fresco的对比
比较Picasso.Glide 和 Fresco 三种图片加载库 比较 Picasso 与 Glide 总体来说二者极为相似,有着近乎相同的 API 的使用风格,但 Glide 在缓存策略和加载 gi ...
- SparkSQL程序设计
1.创建Spark Session val spark = SparkSession.builder . master("local") .appName("spark ...
- vue package.json 解析
vue package.json 中可以看到这个包的来源位置 在repository对象中的url中可以看到 所以当你要封装自己包的时候就可以改变这个地址去加载这个包(把你封装的包发到某个gi ...
- Linux数据备份与恢复
Linux数据备份及服务器重要数据类别分析 对 Linux 服务器来讲,当然最理想的就是把整块硬盘中的数据都备份,甚至连分区和文件系统都备份,这样如果硬盘损坏,那么我们可以直接把备份硬盘中的数据导入损 ...
- The type javax.http.HttpServletRequest cannot be resolved.It is indirectly 解决办法
原因:项目中缺少servlet-api.jar文件. 解决办法:将E:\tomcat\apache-tomcat-6.0.24\lib下的servlet-api.jar拷贝到项目中,然后编译即可.(根 ...
- [leetcode刷题笔记]Implement Trie (Prefix Tree)
题目链接 一A,开森- ac代码: class TrieNode { // Initialize your data structure here. char content; boolean isW ...
- 20145303刘俊谦 《Java程序设计》第2周学习总结
20145303刘俊谦 <Java程序设计>第2周学习总结 教材学习内容总结 1.对于标识符的一些名称规范(觉得挺重要而且容易混淆!定义就不写了,列一些例子): 包名: xxxyyyzzz ...
- linux及安全第二周总结——20135227黄晓妍
实验部分: 首先运行结果截图 代码分析: Mypcb.h /* * linux/mykernel/mypcb.h * * Kernel internal PCB types * * Copyri ...