Home >Web Front-end >HTML Tutorial >How to use flex layout to distribute columns

How to use flex layout to distribute columns

高洛峰
高洛峰Original
2017-03-15 10:05:072772browse

This article introduces the method of using flex layout to distribute columns

html code

<div class=&#39;items&#39;>
    <div class=&#39;item&#39;></div>
    <div class=&#39;item&#39;></div>
    <div class=&#39;item&#39;></div>
</div>

css code

items:{

  display:flex;

flex-direction:column;
-webkit-flex-direction:column;
-moz-flex-direction:column;
 -o-flex-direction:column;

}

.item{

 height:40px;

}


The above is the detailed content of How to use flex layout to distribute columns. 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