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. redis+Keepalived主从热备切换实例

    [root@cache-redis-~/]# cat /etc/keepalived/keepalived.conf ! Configuration File for keepalived globa ...

  2. Python 解决命令行删除、退格乱码问题

    安装了python 在命令行界面无法进行删除.退格 1 安装readline模块 两种方式:yum install -y readline-devel  readline 或者 下载文件https:/ ...

  3. python的os模块fnmatch模块介绍

    一.先介绍一下os模块 import os print(os.getcwd()) # E:\python\test\python_models # 获取当前的目录 print(os.listdir(& ...

  4. LAB12 Transaction

    思路:就是把aotocommit()里面的东西改改就行了. 查询要求可用房间>=所需要的房间. SQL里面查数字时,不要加单引号.字符串才要. 查询里的set ONHAND=要改成自己的变量名s ...

  5. 笔记之monkey自定义脚本

    自定义脚本的稳定性测试 常规MOnkey测试执行的是随机的事件流,但如果只是想让Monkey测试某个特定场景者时候就需要用到自定义脚本,Monkey支持执行用户自定义脚本的测试,用户之需要按照Monk ...

  6. WPF打印京东电子面单(可以异步)

    参考:https://www.cnblogs.com/guogangj/archive/2013/02/27/2934733.html 模板:JDFlowDocument.xaml <FlowD ...

  7. Layui 写一个简单的后台页面

    参考如下: 1.layui 官方文档 http://www.layui.com/doc/ 2.https://blog.csdn.net/huyanliang/article/details/7796 ...

  8. Python学习——1

    我是一名刚入IT行业的小白,目前主要是做网络运维这一块.曾经总是认为我是做网络运维的,学习代码干啥啊?后来就慢慢发现,传统的运维方式让我的效率好像不如别人效率高,关键还TM看别人比我更轻松.每一个网络 ...

  9. vue框架中的日期组件转换为yyy-mm-dd格式

    最近在用vue框架写一个app,这个是用到的日期格式转换,把下面的标准格式转换为字符串连接格式

  10. Python从入门到超神之文件处理

    一.文件处理流程(python默认是utf-8编码) 打开文件函数:open(文件路径,encoding=‘utf-8’)注意:open会检索系统的编码,所以需要调整一致否则报错 例如:fi=open ...