亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

CSS3 ??? ????

CSS3? Flex Elastic ???? ?? ?? ??:
? ???? Flex Elastic ????? ?? ??? ?????. ???? ????? ?? ??? ?? ??? ????.
????? ???? ??? ??? ???? ?? ?? ??? ??? ???. ??? ??? ?? ????? ??? ? ?? ?? ??? ?? ???? ??? ???? ????? ??? ??? ?????. ?? ??? ???????.
?? ?? ??: ??? ?? ??? ?? ? ???? ??? ????.
(1) Flexbox? ?? ?? ???.
(2).CSS3 Flexbox ??? ?? ??? ???.
1. Flex Elastic ??????:
Flex? ??? ????? ???? Flex Box? ?????.
?? ????? ??? ????, ? Flex ?????? ??? ? ????.
?? ?? ??? ???????.

<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://ipnx.cn/" />
<title>php中文網(wǎng)</title>
<style type="text/css">
#box {
  display:flex;
  width:300px;
  height:100px;
  justify-content:space-between;
  align-items:center;
  background:#ccc;
}
#box span {
  border-radius:50px;
  background:green;
  width:50px;
  height:50px;
}
</style>
</head>
<body>
<div id="box">
  <span></span>
  <span></span>
</div>
</body>
</html>

? ??? ??? ????? ??? ??? ?????.
????? ??? ?????? ????? ?? ??? ??? ? ????.

#box{
  display: flex;
}
內(nèi)聯(lián)元素也可以設(shè)置為彈性布局,代碼如下:
#box{
  display: inline-flex;
}

2. ??? ????? ??:
Flex ????? ???? ??? Flex ????(Flex ????) ?? ??? "????"?? ???.
????? ?? ?? ??? ???? "??"??? ?? Flex ??(??? ??)??? ?? ????? ???? ???.
?????? ??? ????.
152623jgffnmo5o8kk8582.jpg?????? ?? ??? ??? ??? ????.
(1) ??: ?? ??? ????? ??? ?? ? ?? ?? ?????.
?? ?? ??: ??? ??? ??? ?? "justify-content" ??? ?? ?????.
(2). ?? ??? ? ?? ??: ????? ????? ?? ????? ?? ????? ????? ????? ?????.
(3). ?? ??: ?? ??? ???? ?? ??? ?? ???? ???.
(4) ???: ??? ??? ?? ?????? ???. ??? ?? ?? ??? ?? ?????.
(5) ?? ?? ? ?? ?: ????? ?? ??? ????? ?? ? ?? ?????? ???? ?? ? ? ?????? ????.
(6). ?? ??: ?? ??? ???? ?? ? ??? ?? ? ???? ???.

3.1.flex-direction ??:
? ??? ??? ?? ??? ??? ??? ?????.
?? ??:

#box {
  flex-direction: row | row-reverse | column | column-reverse;
}

??? ??? ????.

164326tkdpuz8d0b8m880b.jpg?? ? ??:
(1).row(???): ??? ???? ???? ?? ?? ????.
(2).row-reverse: ??? ???? ???? ??? ?? ????.
(3).column: ??? ????, ???? ?? ????? ????.
(4).column-reverse : ??? ???? ???? ??? ????? ????.

3.2 flex-wrap ??:
????? ??? ? ?("?")? ?????.
flex-wrap ??? ? ?? ?? ?? ?? ?? ??? ??? ?????.
?? ??:

#box{
  flex-wrap: nowrap | wrap | wrap-reverse;
}

?????? ??? ????.

165013rkjsg0jq0kl0j2yx.jpg
?? ? ??:
(1) nowrap (???): ??? ??.
165147wyg4jszpv8vfv8li.png

(2) ??? : ???, ? ?? ?? ? ?? ???.

165222h4xxqqewgqhhc5hh.jpg
(3) Wrap-reverse : ? ??, ? ?? ?? ??? ????.

165247tjd1vmgtimdznhtp.jpg
3.3 flex-flow ??:
? ??? flex-direction ??? flex-wrap ??? ?????. ???? row nowrap???.
?? ??:

#box {
  flex-flow: <flex-direction> || <flex-wrap>;
}

3.4 justify-content ??:
justify-content ??? ??? ?? ??? ?????.
?? ??:

#box {
  justify-content: flex-start | flex-end | center | space-between | space-around;
}

?????? ??? ????.
165944b1yj7mboed75dt2d.png???? ??:
5?? ?? ?? ? ??? ???? ??? ? ??? ??? ????. ??? ??? ???? ?????? ?????.
(1).flex-start (???): ?? ??
(2).flex-end: ??? ??
(3).center: ???
(4).space-between: ?? ? ??, ?? ?? ??? ?????.
(5).space-around: ? ??? ?? ??? ?????. ??? ?? ??? ??? ??? ??? ??? ??? ? ????.

3.5 align-items ??:
? ??? ??? ???? ???? ??? ?????.
?? ??:

#box {
  align-items: flex-start | flex-end | center | baseline | stretch;
}

?????? ??? ????.
181218ddy3y8gu077c71tx.png?? ? ??:
5?? ?? ??? ? ????. ???? ??? ???? ??? ?????. ????? ???? ??? ??? ?????.
(1).flex-start: ???? ???? ?????.
(2).flex-end: ???? ??? ?????.
(3).center: ???? ???? ?????.
(4).baseline: ?? ???? ? ?? ?? ??? ?????.
(5) ???(???): ??? ??? ???? ??? ???? ??? ?? ????? ?? ??? ?????.

3.6 align-content ??:
? ??? ?? ?? ??? ?????. ????? ?? ??? ?? ?? ? ??? ??? ????.
?? ??:

#box {
  align-content: flex-start | flex-end | center | space-between | space-around | stretch;
}

?????? ??? ????.
181705c7yel9apep47aj71.png??? ??:
(1).flex-start: ???? ???? ?? ?????.
(2).flex-end: ???? ??? ?? ?????.
(3).center: ???? ???? ?? ?????.
(4).space-between: ???? ?? ?? ????, ? ??? ??? ??? ????? ???.
(5).space-around: ? ?? ?? ??? ?????. ??? ? ??? ??? ?? ??? ??? ??? ? ????.
(6).stretch(???): ?? ?? ?? ?? ?????.

4.1 ?? ??:
? ??? ??? ??? ?????. ?? ???? ??? ?????. ???? 0???.
?? ??:

.item {
  order: <integer>;
}

?????? ??? ????.
205801ricvdjvaav5nvd9i.png4.2.flex-grow ??:
? ??? ??? ?? ??? ???? ???? 0???.
?, ?? ??? ??? ???? ????.
?? ??:

.item {
  flex-grow: <number>; /* default 0 */
}

??? ??? ????.
210034ttrquddrdor9ohoa.png?? ??? flex-grow ??? 1? ?? ??? ??(?? ??)? ???? ????.
4.3.flex-shrink ??:
? ??? ??? ?? ??? ???? ???? 1???. ?, ??? ???? ??? ?????.
?? ??:

.item {
  flex-shrink: <number>; /* default 1 */
}

??? ??? ????.
210325gnaa1c1b3h7771cb.jpg?? ??? flex-shrink ??? 1? ?? ??? ??? ?? ???? ?? ?????.
? ??? flex-shrink ??? 0?? ?? ??? 1? ?? ??? ??? ??? ? ???? ????.
4.4 flex-basis ??:
? ??? ?? ??? ???? ?? ??? ???? ?? ??(?? ??)? ?????.
? ??? ???? ????? ??? ?? ??? ??? ?????. ???? ????? ?? ??? auto???.
?? ??:

.item {
  flex-basis: <length> | auto; /* default auto */
}

4.5.flex ??:
? ??? flex-grow, flex-shrink ? flex-basis? ?????. ???? 0 1 auto???. ??? ? ??? ?? ?????.
?? ??:

.item {
  flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
}

? ???? ??(1 1 ??)? ??(0 0 ??)??? ? ?? ??? ?? ????.
4.6 align-self ??:
? ??? ???? ?? ??? ?? ??? ?? ??? ?? ? ??? align-items ??? ???? ? ????.
???? auto??, ?? ?? ??? align-items ??? ???? ?????. ?? ??? ??? ????? ?????.
?? ??:

.item {
  align-self: auto | flex-start | flex-end | center | baseline | stretch;
}

?????? ??? ????.
210913i07wwl79svvwv7d0.png

? ??? 6?? ?? ?? ? ???, ??? ???? ???? align-items ??? ??? ?????.

???? ??
||
<style> div{ display:flex; width:50px; height:50px; background-color:#eee; flex-direction:row; justify-content: center; align-items:center; float: left; } div:hover{ cursor:pointer; color:white; background-color: #ccc; } </style> <body> <div> 1 </div> <div> 2 </div> <div> 3 </div> </body>