首页 > Web开发 > 详细

6th week blog1(CSS单位)

时间:2018-10-14 13:06:22      阅读:164      评论:0      收藏:0      [点我收藏+]

①CSS单位

1.fr:Tracks can be defined using any length unit. Grid also introduces an additional length unit to help us create flexible grid tracks. The new fr unit represents a fraction of the available space in the grid container. The next grid definition would create three equal width tracks that grow and shrink according to the available space.

可以使用任何长度单位定义轨道。Grid还引入了一个额外的长度单元来帮助我们创建灵活的网格轨道。fr单元表示网格容器中可用空间的一小部分。下一个网格定义将创建三个相等宽度的轨道,根据可用空间增长和缩小。

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

一个像素。对于屏幕显示,它传统上代表一个设备像素(点)。但是,对于打印机高分辨率屏幕,一个CSS像素意味着多个设备像素。1px= 1/96 1in

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

表示font-size元素的计算结果如果在font-size属性本身上使用它,它表示元素继承字体大小。

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

表示font-size根元素(通常<html>)。在根元素中使用时font-size,它表示其初始值(常见的浏览器默认值为16px,但用户定义的首选项可能会修改此值)。

6th week blog1(CSS单位)

原文:https://www.cnblogs.com/shengbowen1004/p/9785683.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!