Home>Article>Web Front-end> What does auto mean in css

What does auto mean in css

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-04-09 16:31:12 6856browse

In CSS, the full English name of auto is "automatic", and the Chinese meaning is "automatic adaptation". Auto is often the default value. If there is no value set for the attribute in CSS, the browser client will use the initial value of the attribute for rendering, which is based on browser adaptation.

What does auto mean in css

The operating environment of this tutorial: Windows7 system, CSS3&&HTML5 version, Dell G3 computer.

auto in css means automatic adaptation, and auto in css is often the default value.

Just like margin:0 auto, it means that the top and bottom margins are 0, and the left and right margins are auto, which means automatic adaptation.

However, if you want to use it, you must give the label a specified width, as follows:

 
居中

In addition,margin:0 autoandmargin : 0 auto 0 autoThe effect is the same.

means that the top and bottom margins are 0, and the left and right margins automatically adapt to the same width.

Recommended learning:css video tutorial

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

Statement:
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