最新国产精品视频免费看_99热这里只有精品在线_无码精品人妻一区_欧美精品丝袜久久久中文字幕

Front-end development: what is the difference between units px, rem, em, vh, vw in CSS

front-end development
front-end development

the

px

px is the abbreviation of pixel, a relative length unit, and a basic unit commonly used in web design. Pixel px is relative to the screen resolution of the monitor

the

em

em is a relative unit of length. Relative to the font size of the text within the current object (the reference is the font-size of the parent element)

If the font size of the current parent element is not set, it will be relative to the browser’s default font size

Features:

1. The value of em is not fixed;

2. em will inherit the font size of the parent element

the

rem

rem is a relative unit added by CSS3, and rem is a length unit calculated relative to the font size (font-size) of the HTML root element

If you do not set the font size of html, it will use the default font size of the browser, usually 16px

html{font-size: 62.5%} /* 10 ÷ 16 × 100% = 62.5% */

body{font-size: 1.4rem;} /* 1.4 × 10px = 14px */

/*A basic font size of 62.5% is defined in the root element (that is, 10px. Setting this value is mainly convenient for calculation. If it is not set, it will be based on “16px”)*/

The advantage is that you only need to set the size of the root directory to adjust the proportion of the entire page

rem compatibility: rem is already supported in all browsers except IE8 and earlier

The difference between em and rem:

rem is the font size relative to the root element (html), while em is the font size relative to its parent element

Rules for using both:

  • If this property is measured according to its font-size, use em
  • Rem is used for all other attributes

A conversion tool for px, em, rem units is provided here: http://pxtoem.com/

Front-end development: what is the difference between units px, rem, em, vh, vw in CSS

the

vw, vh

The four units of vw, vh, vmax, and vmin are based on the viewport

vw is relative to the width of the viewport (viewport), and the length is equal to 1/100 of the viewport width

If the width of the browser is 200px, then 1vw is equal to 2px (200px/100)

vh is relative to the height of the viewport, and the length is equal to 1/100 of the height of the viewport

If the height of the browser is 500px, then 1vh is equal to 5px (500px/100)

vmin and vmax are the minimum or maximum relative to the height and width of the viewport

/*
If the height of the browser is 300px and the width is 500px, then 1vmin is 3px, and 1vmax is 5px; if the height of the browser is 800px, and the width is 1080px, then 1vmin is also 8px, and 1vmax is also 10.8px
*/

the

Other units:

% (percentage)

Generally speaking, relative to the parent element

1. For ordinary positioning elements, it is the parent element we understand

2. For position: absolute; elements are relative to the positioned parent element

3. For position: fixed; elements are relative to ViewPort (visual window)

the

vm

css3 new units, relative to the viewport’s width or height, whichever is smaller

The smallest of them is divided into 100 units of vm

For example: browser height 900px, width 1200px, take the minimum browser height, 1 vm = 900px/100 = 9 px

Disadvantages: poor compatibility

the


common problem:

1. If you use em to set the text size, what should you pay attention to?

Pay attention to the font size of the parent element, because the em is set according to the size of the parent element.

For example, it is also 1.5em, if the parent element is 20, then 1.5em is 30px. If the parent element is 30px, 1.5em is 45px (especially in multiple div nesting)

2. In what scenarios are pc pt ch generally used?

These are basically not used in our web design, and will be useful in typesetting

3. How to make 1rem=10px

Just set HTML{font-size: 62.5%;}

4. If the parent element does not specify a height, what is the percentage height of the child element?

It will follow the actual height of the child element, and setting the percentage will have no effect

the

the

About us:

Infocode Lanchang Information Technology Co., Ltd. has successfully provided high-quality services for many Fortune 500 companies and other famous brands in the world. It is your reliable Internet development provider.

Serving customers throughout Beijing, Shanghai, Hangzhou, Shenzhen, Guangzhou, Tianjin, Qingdao, Nanjing, Ningbo, Suzhou, Wuxi, Xiamen, Chongqing, Xi’an and other large and medium-sized cities and regions Provide you with: H5 development, small program development, H5 outsourcing, WeChat development, H5 mall development, small program mall development, website development outsourcing, H5 game development, small program development outsourcing, Small program design, APP development outsourcing, UI design, SEO optimization, SEO outsourcing, video post-production and other high-quality services

What are the main functions of video and TV applet development?



請輸入姓名或昵稱
如果您有任何疑問、需要更多信息或希望與我們建立合作請留言
=
(0)
Infocode藍暢Infocode藍暢
上一篇 2022年7月17日 下午11:57
下一篇 2023年8月16日 下午10:36

相關文章內容推薦

欧美精彩视频一区二区三区| 伊人久久婷婷色综合98网| 国产在线麻豆精品观看| 亚洲国产精品va在线看黑人| 亚洲一区美女视频在线观看免费| 久久久噜噜噜久久狠狠50岁| 欧美三级资源在线| 狠狠色综合网站久久久久久久| 99精品热视频| 久久乐国产精品| 欧美亚日韩国产aⅴ精品中极品| 樱花yy私人影院亚洲| 亚洲一级免费视频| 欧美成人资源网| 国产一区二区剧情av在线| 99精品欧美一区| 久久综合色综合88| 国产欧美精品在线| 99精品国产热久久91蜜凸| 久久综合九色99| 国产欧美在线看| 亚洲网友自拍| 欧美极品影院| 在线成人国产| 久久久av水蜜桃| 国产麻豆精品久久一二三| 日韩午夜激情电影| 免费亚洲一区| 一区二区在线不卡| 国产农村妇女精品一二区| 欧美日韩网址| 国产精品乱子乱xxxx| 99精品视频免费观看视频| 欧美91大片| 欧美日韩成人精品| 国产精品一区免费在线观看| 一本色道久久| 欧美韩日一区| 亚洲国产欧美日韩| 久久一综合视频| 国产一区二区三区高清在线观看| 亚洲一区欧美一区| 欧美三级网址| 免费日韩精品中文字幕视频在线| 国产综合色在线视频区| 国产一区二区日韩精品| 国产精品亚洲综合天堂夜夜| 亚洲麻豆av| 国产色产综合产在线视频| 亚洲欧美另类国产| 久久久亚洲人| 在线观看三级视频欧美| 久久五月天婷婷| 激情国产一区| 久久这里有精品视频| 精品1区2区3区4区| 久久视频在线看| 在线观看91精品国产入口| 久久久综合香蕉尹人综合网| 伊人精品久久久久7777| 久久综合999| 亚洲成人在线观看视频| 久久综合狠狠| 亚洲狠狠丁香婷婷综合久久久| 欧美成人精品在线视频| 亚洲激情一区二区| 欧美精品免费在线| 一二三区精品| 国产精品久久久久久久电影| 亚洲男人影院| 国产视频久久久久久久| 久久免费视频网站| 亚洲国产日韩精品| 欧美日本簧片| 中文精品在线| 国产精品毛片| 久久久久九九视频| 亚洲国产精品国自产拍av秋霞| 欧美多人爱爱视频网站| 欧美在线视频一区二区| 国模精品一区二区三区色天香| 久久精品最新地址| 亚洲福利视频三区| 欧美黄色片免费观看| 99这里只有精品| 国产模特精品视频久久久久| 久久久久久久精| 亚洲国产精品一区二区第四页av| 欧美激情一区二区三区成人| 一区二区欧美亚洲| 国产欧美精品一区| 欧美日韩p片| 欧美在线观看一区二区三区| 国产午夜精品福利| 欧美成人精品激情在线观看| 一本色道久久综合亚洲精品不卡| 免费一级欧美片在线观看| 国产一区二区三区黄| 免费亚洲一区二区| 一区二区三区.www| 国产亚洲一区二区三区| 欧美成人性生活| 国产亚洲精久久久久久| 美腿丝袜亚洲色图| 一区二区三区欧美激情| 国产亚洲精品久| 欧美大片在线观看| 亚洲欧美成人精品| 亚洲国产成人久久| 国产精品国产三级国产专播品爱网| 久久精品免费看| 一区二区三区欧美成人| 免费av成人在线| 亚洲图片在线观看| 极品av少妇一区二区| 欧美日韩美女在线观看| 久久国产精品久久精品国产| 亚洲精品视频中文字幕| 国产日韩精品一区二区三区在线| 美女国产一区| 亚洲欧美日韩另类精品一区二区三区| 精品成人国产| 国产精品久久久久久久久久直播| 久久综合五月天婷婷伊人| 亚洲线精品一区二区三区八戒| 尤物在线精品| 国产精品视频一| 欧美国产日本| 久久福利毛片| 亚洲少妇一区| 亚洲国产欧美日韩| 国产视频一区三区| 欧美揉bbbbb揉bbbbb| 可以免费看不卡的av网站| 午夜精品久久久久久久久久久久| 亚洲日本欧美日韩高观看| 国产一区二区在线免费观看| 欧美日韩一二三区| 欧美ab在线视频| 久久精品一区二区三区中文字幕| 一区二区三区精品国产| 亚洲国产另类精品专区| 国产亚洲午夜高清国产拍精品| 欧美日韩免费视频| 午夜精品一区二区三区四区| 99精品久久免费看蜜臀剧情介绍| 在线不卡中文字幕| 国产目拍亚洲精品99久久精品| 久久国产精品久久w女人spa| 亚洲一区二区三区成人在线视频精品| 亚洲国产婷婷香蕉久久久久久| 国产一区二区精品久久| 国产精品久久久久秋霞鲁丝 | 麻豆视频一区二区| 欧美一区免费视频| 亚洲欧美日韩成人| 亚洲深夜福利视频| 亚洲九九九在线观看| 亚洲国产mv| 在线不卡a资源高清| 国产综合色一区二区三区| 国产欧美韩国高清| 国产精品日韩欧美大师| 国产精品v日韩精品| 欧美色大人视频| 欧美日韩在线精品| 欧美三级视频在线| 欧美日本免费| 国产精品青草久久| 亚洲国产高清高潮精品美女| 国产欧美精品| 国产乱理伦片在线观看夜一区| 国产精品视频男人的天堂| 国产精品久久久亚洲一区| 欧美精品在线观看91| 亚洲激情在线观看| 尤物视频一区二区| 18成人免费观看视频| 亚洲成人在线网| 亚洲国产va精品久久久不卡综合| 在线国产日韩| 亚洲福利av| 亚洲国产午夜| 最新中文字幕亚洲| 亚洲精品国产精品国自产观看浪潮 | 亚洲黄色三级| 最新中文字幕一区二区三区| 亚洲欧洲精品一区| 日韩午夜在线观看视频| 欧美大色视频| 欧美日韩精品久久久| 麻豆精品一区二区综合av| 欧美不卡一区| 欧美日韩国产在线| 国产精品成人久久久久| 国产伦精品一区二区三区视频孕妇 | 欧美成人免费网站| 欧美经典一区二区| 欧美日韩视频| 国产精品无人区|