Absolute positioning in css

巴扎黑
Release: 2017-03-18 13:45:26
Original
1545 people have browsed it

[Introduction] Positioning (left and top) The css positioning attribute will be the key for netizens to open the door to happiness: H4 { position: absolute; left: 100px; top: 43px } This CSS rule allows the browser to < The starting position of H4> is accurately set at 100 pixels from the left side of the browser, and the

positioning (left and top)


css positioning properties will make netizens happy. The key to the door:

H4 { position: absolute; left: 100px; top: 43px }

This CSS rule allows the browser to accurately determine the starting position of

Positioned 100 pixels from the left side of the browser and 43 pixels from its top.

Note that the only settings here are the left and top, that is to say, the text will enter the browser window from left to right and top to bottom.

The left and top properties are very intuitive. Left (left) sets the distance between the element and the left side of the browser window, and top (top) sets the distance from the top of the browser window.

When setting these distances, you can use various length units or scale values ​​that you have learned. When using scale values, the scale value refers to the size relative to the parent feature.

What can you target? anything! Paragraphs, words, GIF and JPEG images, QUICKTIME movies and more

The above is the detailed content of Absolute positioning in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template