CSS单位

em and rem: are often used to create scalable layouts, which maintain the vertical rhythm of the page even when the user changes the font size.

cap:Represents the "cap height" (nominal height of capital letters) of the element’s font.

ch:Represents the width, or more precisely the advance measure, of the glyph "0" (zero, the Unicode character U+0030) in the element's font

em:Represents the calculated font-size of the element. If used on the font-size property itself, it represents the inherited font-size of the element.

ex:Represents the x-height of the element's font. On fonts with the "x" letter, this is generally the height of lowercase letters in the font; 1ex ≈ 0.5em in many fonts.

ic:Equal to the used advance measure of the "水" (CJK water ideograph, U+6C34) glyph found in the font used to render it.lhEqual to the computed value of the line-height property of the element on which it is used, converted to an absolute length.

rem:Represents the font-size of the root element (typically <html>). When used within the root element font-size, it represents its initial value (a common browser default is 16px, but user-defined preferences may modify this).

rlh:Equal to the computed value of the line-height property on the root element (typically <html>), converted to an absolute length. When used on the font-size or line-height properties of the root element, it refers to the properties' initial value.

vh:Equal to 1% of the height of the viewport's initial containing block.

vw:Equal to 1% of the width of the viewport's initial containing block.

vi:Equal to 1% of the size of the initial containing block, in the direction of the root element’s inline axis.

vb:Equal to 1% of the size of the initial containing block, in the direction of the root element’s block axis.

vmin:Equal to the smaller of vw and vh.

vmax:Equal to the larger of vw and vh.

px:One pixel. For screen displays, it traditionally represents one device pixel (dot). However, for printers and high-resolution screens, one CSS pixel implies multiple device pixels. 1px = 1/96th of 1in.

cm:One centimeter. 1cm = 96px/2.54.

mm:One millimeter. 1mm = 1/10th of 1cm.

Q:One quarter of a millimeter. 1Q = 1/40th of 1cm.

in:One inch. 1in = 2.54cm = 96px.

pc:One pica. 1pc = 12pt = 1/6th of 1in.

pt:One point. 1pt = 1/72nd of 1in.

随机推荐

  1. windows搭建zabbix agent

    1.下载和解压zabbix agent 地址: http://www.zabbix.com/downloads/2.4.4/zabbix_agents_2.4.4.win.zip解压:conf目录存放 ...

  2. Nevertheless 和 Nonetheless,你用对了吗?

    本文转自:https://www.sohu.com/a/229443257_338773 Nevertheless 以及 nonetheless 都可以表示转折.很多人很多课程也提到这两者基本上可以交 ...

  3. python基础 ------ 集合

    ---恢复内容开始--- -----   集合 使用场景:网购的订单.与商品ID 一一对应的商品信息 python的内置类型:List  Tuple  Dictionary ----  列表   LI ...

  4. 在vue.js中使用echarts,数据动态刷新

    在vue使用echarts时,可能会遇到这样的问题,就是直接刷新浏览器,或者数据变化时,echarts不更新? 这是因为Echarts是数据驱动的,这意味着只要我们重新设置数据,那么图表就会随之重新渲 ...

  5. springmvc webservlet 异步请求总结

    1:每次请求会启动一个新线程 上边在debug状态下, 每次请求一次,生成一个新的 thread  在此已经是245了 出现一个现象在debug模式下, 每次请求生成的线程,自动在红框那个位置停了下来 ...

  6. angular4模块中标签添加背景图

    一.现象 一个全屏的“走马灯”每项需要添加背景图,在循环标签里需要动态添加行内样式 二.解决 1.首先有一个图片数组,如: export class AppComponent { array = [& ...

  7. dos命令 创建数据库,建表,两表联查,三表联查(mysql---第一篇)

    首先打开mysql的控制台,输入密码进行登录  (ps:本文的mysql控制台,是运用的php的集成环境(phpstudy),点击运行,找到mysql命令行,直接打开就可以了) 登陆成功后,就可以进行 ...

  8. import os, glob, fnmatch--Python os/glob/fnmatch主要函数总结

    auther: Lart date: 2019-01-17 update: 2019-01-18 09:55:36 --- import os, glob, fnmatch 针对某些操作, 官方推荐这 ...

  9. common skill

    lunix watch and kill progress 1.  ps -ef 2. kill -9 pid

  10. spring.boot 无法加载oracle驱动的可能原因

    .找到本地oracle安装目录下的ojdbc6.jar包,为了方便起见,复制到某盘的根目录(如F盘根目录),在cmd下进入F盘根目录(也就是ojdbc.jar复制的目录),同时我们需要查看ojdbc的 ...