<span style=
"color: #008080;"
> 1</span> <span style=
"color: #800000;"
><div
class
=
"flex-container"
>
<span style=
"color: #008080;"
> 2</span> <span style=
"color: #800000;"
><div
class
=
"flex-item"
>flex item 1</div>
</span><span style=
"color: #008080;"
> 3</span> <span style=
"color: #800000;"
><div
class
=
"flex-item"
>flex item 2</div>
</span><span style=
"color: #008080;"
> 4</span> <span style=
"color: #800000;"
></span>
</div>
</span><span style=
"color: #008080;"
> 5</span>
<span style=
"color: #008080;"
> 6</span>
<span style=
"color: #008080;"
> 7</span> <span style=
"color: #800000;"
>CSS样式
</span><span style=
"color: #008080;"
> 8</span> <span style=
"color: #800000;"
>.flex-container </span>{
<span style=
"color: #008080;"
> 9</span> <span style=
"color: #ff0000;"
> direction</span>:<span style=
"color: #0000ff;"
> rtl</span>;
<span style=
"color: #008080;"
>10</span> <span style=
"color: #ff0000;"
> display</span>:<span style=
"color: #0000ff;"
> -webkit-flex</span>;
<span style=
"color: #008080;"
>11</span> <span style=
"color: #ff0000;"
> display</span>:<span style=
"color: #0000ff;"
> flex</span>;
<span style=
"color: #008080;"
>12</span> <span style=
"color: #ff0000;"
> width</span>:<span style=
"color: #0000ff;"
> 300px</span>;
<span style=
"color: #008080;"
>13</span> <span style=
"color: #ff0000;"
> height</span>:<span style=
"color: #0000ff;"
> 240px</span>;
<span style=
"color: #008080;"
>14</span> <span style=
"color: #ff0000;"
> background-color</span>:<span style=
"color: #0000ff;"
> Silver</span>;
<span style=
"color: #008080;"
>15</span>
<span style=
"color: #008080;"
>16</span> }
<span style=
"color: #008080;"
>17</span>
<span style=
"color: #008080;"
>18</span> <span style=
"color: #800000;"
>.flex-item </span>{
<span style=
"color: #008080;"
>19</span> <span style=
"color: #ff0000;"
> background-color</span>:<span style=
"color: #0000ff;"
> DeepSkyBlue</span>;
<span style=
"color: #008080;"
>20</span> <span style=
"color: #ff0000;"
> width</span>:<span style=
"color: #0000ff;"
> 100px</span>;
<span style=
"color: #008080;"
>21</span> <span style=
"color: #ff0000;"
> height</span>:<span style=
"color: #0000ff;"
> 100px</span>;
<span style=
"color: #008080;"
>22</span> <span style=
"color: #ff0000;"
> margin</span>:<span style=
"color: #0000ff;"
> 5px</span>;
<span style=
"color: #008080;"
>23</span> }