???????CSS5 > DIV CSS???? >

CSS margin ??????

?????????2013-02-22 08:05:59 ?????css5.com.cn

CSS ??????div??div???????????css margin DIV CSS margin?????????????????

margin??????????????????????????2??????????DIV????????????????margin??????????2????????Margin????????????????????????marign??padding?????css padding????????????????

??
  1. margin??????y?
  2. css margin????
  3. ?????margin???
  4. css margin??????
  5. css margin???

???margin?????????   -  TOP

DIV CSS?????CSS????????margin??margin???????????????????????????????????

1??margin??
Margin:10px
Margin?????????+html????????????auto??????????????

2????y?

Div{margin:10px}

????div??????????10px

3??Margin???
margin?????????????????????
margin???????????????????????????????????????PX??????margin-left:20px?????????auto???????(margin-left:auto ???)????????????%?????margin-left:3%????

Margin?????????????????????????
margin-left ????????????? ??margin-left:5px; ??????????5px??
margin-right ????????????? ??margin-right:5px; ??????????5px??
margin-top ????????????? ??margin-top:5px; ??????????5px??
margin-bottom ???????????? ??margin-bottom:5px; ?????????5px??

margin???????
????margin?????

4??margin????????
??????????????????
css?????????margin???
???????“CSS???”??“DIV CSS????”???????????????????????????

????css margin????  -  TOP

margin????CSS?????????????????????????????????????????????????
???????????CSS???-CSS?????//www.css5.com.cn/jiqiao/97.shtml
???????????HTML???-HTML????????????//www.css5.com.cn/jiqiao/326.shtml

1??????????????
????margin-top:5px; margin-bottom:6px
???????margin:5px 0 6px 0??margin:5px auto 6px auto

2??????????????
????margin-left:5px; margin-right:6px
???????margin:0 6px 0 5px??margin:auto 6px auto 5px

3??????????????
????margin-top:5px; margin-bottom:6px; margin-left:4px
????margin:5px 0 6px 4px??margin:5px auto 6px 4px

4???????????
????margin-top:5px; margin-bottom:5px; margin-left:5px; margin-right:5px
????margin:5px;

5??????????
????margin-top:5px; margin-bottom:6px; margin-left:7px; margin-right:8px
????margin:5px 8px 6px 7px;

6????????????????????????????

????????????????????margin-top:5px; margin-bottom:5px; margin-left:7px; margin-right:7px
????margin:5px 7px;

Margin?????????

margin css?????????????
css div margin?????????????

?????????margin???

1????margin????????????
???????margin????2?????????????????????????????????????????margin??????

???margin?????
??????margin?????

2??????margin??????????????????
marign:0 auto;
???????????????????????????????????????????????text-align:center???????????????????????body?????????text-align:center???????????????????????????????margin:0 auto?????????????????????????????????body???????text-align:center?????????????CSS5?????css?????????DIV CSS??????????????????css text-align:center??????????????

???css margin???????

CSS5????2??????????????margin????????????2????????css border????????css?????css?????

1??margin??css????

.CSS5-top,.CSS5-bottom{width:300px;height:100px;border:1px solid #F00}
.CSS5-bottom{ margin-top:10px}

2??html???????

<div class="CSS5-top">?????</div>
<div class="CSS5-bottom">???????????????margin-top?10px???</div>

3??mairgin??e??????

div+css margin????????????
margin?????????????

????????????????margin?????????????div?????span??????????????????margin??????????????????

?]css margin???

Margin??????????????????????????????????????????????margin-left??margin-right??margin-top??margin-bottom????????margin?????????????????????????????margin????????????????????????margin???????????????margin??

margin???
?????CSS margin????????????CSS HACK??IE6???????????????????????????
????????????CSS?????????????

?????????????CSS5????margin????//www.css5.com.cn/shili/6.shtml??

??????
CSS ???
CSS ???
CSS padding
CSS margin

???(Tag): margin
???????URL?????/css/128.shtml

?????css

??????CSS background ???????
??????css text-decoration ???_????????