6th week blog1(CSS单位)

①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,但用户定义的首选项可能会修改此值)。

转载于:https://www.cnblogs.com/shengbowen1004/p/9785683.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值