zoukankan      html  css  js  c++  java
  • web-单位

    em:

    相对当前元素的相对长度单位。相对于当前对象内文本的字体尺寸。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.

    rem:

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

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

    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.

    fr:

    一个自适应单位,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.

  • 相关阅读:
    hbase源码分析.客户端.预备知识.ExecutorService
    Dijkstra for MapReduce (1)
    [leetcode]Palindrome.Partitioning
    CSS3兼容性写法
    C#延时
    python学习日记180823
    2012年11月11日 本周随笔
    2012年11月20日 上周回顾 && 疯狂的程序员书摘
    2012年11月27日 上周回顾
    hadoop loadBalance源码分析
  • 原文地址:https://www.cnblogs.com/nsgbdzm/p/9788930.html
Copyright © 2011-2022 走看看