• 作业 单位


    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.

    像素是相对于显示器屏幕的分辨率的相对长度单位。

    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.

    相对当前元素的相对长度单位。相对于当前对象内文本的字体尺寸。em的值并不是固定的,会继承父级元素的字体大小。如当前对行内文本的字体尺寸未被人为设置,则相对于浏览器的默认字体尺寸。

    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).

    相对html中根元素的字体尺寸的大小

    fr:

    What we're doing here is setting a fixed width in pixels for the first column and then creating twelve separate columns which are set at one "fraction of the free space" (literally how the spec phrases it). But there's no crazy calculations or anything! It's super readable and if the width of that left nav changes then the width of our columns on the right will adjust themselves automatically.

    自适应单位,fr单位被用于在一系列长度值中分配剩余空间,如果多个已指定了多个部分,则剩下的空间根据各自的数字按比例分配。

  • 相关阅读:
    利用heroku+mongoLab 部署Node 运用
    css常见解决方案
    JavaScript数组基本用法
    ES5中数组的新方法
    JavaScript闭包详解
    力扣第991题 坏了的计算器
    力扣第1189题 “气球” 的最大数量
    力扣第142题 环形链表 II
    力扣第260题 只出现一次的数字 III
    力扣第141题 环形链表
  • 原文地址:https://www.cnblogs.com/cmymm/p/9849032.html
Copyright © 2020-2023  润新知