css relative positioning

巴扎黑
Release: 2017-03-18 14:03:42
Original
1776 people have browsed it

[Introduction] CSS absolute positioning allows you to accurately position elements at independent locations on the page, regardless of the positioning settings of other elements on the page. Relative positioning means that the feature you are positioning is positioned relative to its assigned position in the file. Example: I { position: relative; left: 40px; t

css absolute positioning allows you to accurately position the independent position of elements on the page, regardless of the positioning settings of other elements on the page. Relative positioning means that the feature you are positioning is positioned relative to its assigned position in the file. Example:


I { position: relative; left: 40px; top: 10px }


The key to relative positioning is that the position of the positioned element is relative to its normal position should be positioned at the location. If you stop using relative positioning, the text's display position will return to normal.

Be careful when using relative positioning, otherwise the page will be very messy.

In addition to relative positioning and absolute positioning, you can also use static parameter values. Its usage is the same as the positioning method in ordinary HTML, and special positioning settings cannot be attached.

its not bad, right? Below we'll learn how to control positioned elements.

The above is the detailed content of css relative positioning. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!