One, CSS length value
em
relative to the parent element's font size
ex
height relative to lowercase "x"
gd
Generally used in East Asian typography, this is not related to English
rem
relative to the root element font size
VW
relative to the view Window width: Window width is 100vw
One, n more chatterSome of the new units in the CSS3 were introduced in the spring of last year, see: CSS length values and time, frequency, and angle units. Obviously, it mentions the unit VW, VH, which is to be lamented in this article, see:But "I see you" is not the same as "I Touch You". Coincidentally, a coinciden
One, n more chatterSome of the new units in the CSS3 were introduced in the spring of last year, see: CSS length values and time, frequency, and angle units. Obviously, it mentions the unit VW, VH, which is to be lamented in this article, see:But "I see you" is not the same as "I Touch You". Coincidentally, a coinciden
This article mainly introduces the use of CSS3 new unit VW, VH tutorial, this article through the example code to introduce the meaning of VW, VH, Vmin, Vmax and the difference between VW, VH and% percent, interested friends to see it together
Units for responsive layouts the first time we would think of a REM unit fo
When dealing with mobile pages, we sometimes need to make the banner diagram a wide square with the screen to get the best experience, such as the Flipbord mobile page: So how do you use pure CSS to make a square that can fit the size? Scenario One: CSS3 VW unit CSS3 has a new set of length units relative to the viewable area as a percentage of
16px.All non-adjustable browsers are compliant with: 1EM=16PX. At this time 1.25em=16px*1.25=20px;If the body is defined font-size:12px; Now 1em=12px,1.25em=12px*1.25=15px;If we set the body font-size:62.5%, that is 16px*62.5%=10px, at this time 1em=10px,1.25em=12.5px;This is better for us to calculate, the original PX value divided by 10, and then put on the EM unit, EM can be compatible with multi-browserEM characteristics: 1, EM value is not fixed; 2, em inherits the font size of the parent
1.rem and EM, pxfirst of all, the EM and px relationship em refers to the font height of the browser default 1em=16px, so 0.75em=12px; we often see the font-size:65% of the root element written on the page, so that EM becomes 16px*62.5=10em; this is the font size that is displayed on the page is 10px;So 12px=1.2em,10px=1em, which means you just need to divide your original PX value by 10, and then put EM in as the unit on the line,Characteristics of EMEM is a relative value he will change accord
The length unit mainly has the following kinds of EM ex ch REM VW VH vm cm mm in pt pc px%, presumably can be divided into several "absolute units" and "relative units" and "percent units".
Absolute unit: px in cm mm
Relative unit: EM rem pt PC EX CH
Percent unit:
Seven CSS units that you may not know, css units
If you are a front-end development engineer, px and em are usually used frequently. However, the focus of this article today is to introduce some units that we seldom use or even hear about.I. Review em
Because font-size is i
This article mainly describes the CSS in the window units and percentage of the use of units, is the basic knowledge of CSS primer learning, the need for friends can refer to the following
Windows (Viewport) units
Windows (Viewport) uni
/c/2008/11/kiy1a50ewiiggr14.asp
CSS Length Units
In CSS, there are two types of length units, absolute length units and relative length units respectively.
Absolute length Unit
Absolute length
Say in front of the words
The Gregorian calendar 2014 has been far away from us, 2015. Wish you all a happy New Year! In the new year, I will have a new metamorphosis! This is the first article in 2015, write an article about the unit of CSS! Company IntroductionWhen it comes to CSS units, we should first think of PX, that is, pixels, we are in the layout of
Article Introduction: The best thing about the characteristics of this article is that they solve real-world problems, from trivial and cumbersome selectors to new challenges in building responsive web sites. In fact, I expect every feature to be used in the most mundane projects.
The future of the CSS is so exciting: on the one hand, is a new way of page layout, on the other hand, cool filters, colors and other visual effects. These
height of the display window rather than the width of the parent element? This is exactly what the VH and VW units offer.VH equals the viewport height of 1/100. For example, if the height of the browser is 900PX,1VH the value is 9px. Similarly, if the display window width is 750PX,1VW evaluates to 7.5px.These rules seem to have endless uses on the surface. For example, making a full height or nearly full h
We are easily unable to get rid of the use of our familiar CSS technology, when new problems arise, this will put us in a disadvantageous position.As the web continues to evolve, the need for new solutions will continue to grow. So, as Web designers and front-end developers, we have no choice but to get to know our toolset and be familiar with it.This means that we also need to understand some special tools-those that are not used very often, but when
Anchor point: Percent minus fixed element in CSSCompany IntroductionWhen it comes to CSS units, we should first think of the PX, that is, pixels, we are generally used in the page layout px, but in recent years, adaptive page layout More and more, EM and percentages are often used. Then with the popularity of mobile phones, web apps and hybrid app development, all use the CSS3 technology, in the CSS3, a lot
percentage of CSS does not always solve the best scenario for each problem, and the width of the CSS is relative to the width of the parent element closest to it. If you want to use the width and height of the viewport instead of the width of the parent element, you can use VH and VW units. 1VH = Viewportheight * 1/10
Windows (Viewport) unit
Windows (Viewport) units are relative units, meaning they have no objective dimensions. Their size is determined by the size of the window (Viewport). Here are four units associated with Windows (Viewport).
I will focus on the first two units because they are more likely to be used.
In m
equal to 4px. If the viewable area height is 800px, 1VH is equal to 8px.Similarly, the VW unit is related to the width of the viewable area. Therefore, the value of 1VW can be calculated. 1VW is equal to 1/100 of the viewable area width. For example, if the width of the window is 1200px, then 1VW will be 12px.Vmin and VmaxVmin is a smaller value in the current VM and VH, that is, a length of 1/100 on the smaller side of the viewable area, for example
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.