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 VW, VH, Vmin, Vmax. Where VW is a unit relative to the viewport width percentage, 1vw = 1% viewport width, VH is a unit relative to the viewport height percentage, 1VH = 1% Viewport height;vmin is the percentage unit of the smaller one relative to the current viewport width high school, the same as V Max is a percentage unit of the larger one relative to the current viewport width high school. The Unit browser compatibility is as follows: With VW units, we can easily make adaptive squares: <p class= "placeholder" ></p>&a
1. Detailed Introduction to Mobile pages
Summary: 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 Flipbord's mobile page: So how do you use pure CSS to make a square that is adaptive to size? Scenario One: CSS3 VW unit CSS3 has a new set of length units relative to the viewable area as a percentage of VW, VH, Vmin, Vmax. Where VW is the unit relative to the viewport width percentage, 1vw = 1% viewport width ...
2.10 Articles on VW units
Summary: 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 Flipbord's mobile page: So how do you use pure CSS to make a square that is adaptive to size? Scenario One: CSS3 VW unit CSS3 has a new set of length units relative to the viewable area as a percentage of VW, VH, Vmin, Vmax. Where VW is the unit relative to the viewport width percentage, 1vw = 1% viewport width ...
3. A detailed description of the height attribute
Summary: CSS height is defined by the CSS style to set the corresponding p-height, the CSS height property is the word height, width can be set to calculate the height as a percentage, set the height in pixel value, set the height in relative length, and so on. This property is supported by all major browsers. A summary of how the Height property is used is summarized below. 1. Using CSS to solve the high self-adaptive problem of highly adaptive problem, I am very inconsistent with JS to solve, because not good maintenance, also not enough natural, but pure with CSS, difficult, such as the following I would like to say the example. Requirements: 1. ...
4. Summary of how to use height attributes in CSS
Summary: CSS height is defined by the CSS style to set the corresponding p-height, the CSS height property is the word height, width can be set to calculate the height as a percentage, set the height in pixel value, set the height in relative length, and so on. This property is supported by all major browsers. A summary of how the Height property is used is summarized below. 1. Using CSS to solve the high self-adaptive problem of highly adaptive problem, I am very inconsistent with JS to solve, because not good maintenance, also not enough natural, but pure with CSS, difficult, such as the following I would like to say the example.
5. Summary of how to use width attribute widths in CSS
Summary: CSS width is defined by CSS style to set the corresponding div width, the CSS width property is the word width, width can be set to calculate the width as a percentage, set the width in pixel values, set the width in relative length, and so on. This property is supported by all major browsers.
6. Summarize the 3 length units common in CSS (px em rem)
Introduction: The following is for everyone to summarize the common HTML units introduced in the Css+div layout in the length of the unit introduction. Personally think that now using PX to do font units in IE can not be used in the browser font scaling function of the shortcomings are no longer so important. Because the new version of IE7,IE8 has already supported the entire Web page zoom function, including Firefox by default is also scaling the entire Web page, instead of scaling the CSS font, not so simple to scale the size of the font is there any significant significance?
7. CSS margin margin properties and usage summary
Summary: An empty area around an element's border is the margin. Setting the margin creates an extra "blank" outside the element. The simplest way to set the margin is to use the margin property, which accepts any length units, which can be pixels, inches, millimeters, or em, percent values, or even negatives. In the following article, we will discuss the margins margin property and how to use it.
8. Use the margin property of the CSS
Summary: The simplest way to set margins is to use the margin property. The margin property accepts any length unit, which can be pixels, inches, millimeters, or EM. Margin can be set to auto. A more common practice is to set the length value for the margin. The following declaration sets a 1/4-inch-wide gap on each edge of the H1 element:
9. Detailed description of length units in CSS
Introduction: The following small series for everyone to bring a cliché of the length of the CSS unit. Small series feel very good, now share to everyone, also for everyone to make a reference. Let's take a look at it with a little knitting.
PHP uses MB_SUBSTR () to solve the problem of Chinese string truncation garbled
Introduction: PHP comes with several string interception functions, which are commonly used in substr and MB_SUBSTR. The former in the processing of Chinese, GBK is 2 units of length, UTF is 3 units of length, the latter is specified after encoding, a Chinese is 1 length units.