分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

6th week blog1(CSS单位)

发布时间:2023-09-06 02:18责任编辑:林大明关键词: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,但用户定义的首选项可能会修改此值)。

6th week blog1(CSS单位)

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

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved