1.padding and margin, several parameters_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:53:29
Original
1299 people have browsed it

This article will be very short.

 

Then as shown in the picture above, margin refers to the outer margin, padding refers to the inner margin, the border has its own pixel width, and the element is multiplied by 1335 Take 392 places.

There are four margins, like padding, top right bottom left. You can choose margin-top to set them one by one, or you can use margin:10px 0 0 0;.

Then take margin as an example, padding is similar, and there are three forms of parameters that can be followed.

1.margin: 3px 5px;??Two parameters represent top, bottom and left and right respectively, that is, the top and bottom margins are both 3px, and the left and right margins are both 5px.

 2.margin: 10px 15px 5px;??Three parameters, representing top, left, and bottom respectively, that is, the top margin is 10px, the left and right margins are both 15px, and the bottom margin is 5px.

 3.margin: 10px 7px 5px 8px;??Four parameters, representing top, right, bottom and left respectively, that is, top margin 10px, right margin 7px, bottom margin 5px, left margin 8px.

Padding has the same writing method and meaning.

above.

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