分享web开发知识

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

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

web-单位

发布时间:2023-09-06 02:18责任编辑:胡小海关键词:暂无标签

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.

web-单位

原文地址:https://www.cnblogs.com/nsgbdzm/p/9788930.html

知识推荐

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