Source Code: (back to article)
<!DOCTYPE html>
<html>
<title>Заголовок документа</title>
<head>
<style>
.box{
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
width: 310px;
height:310px;
border:2px solid green;
}
.box div {
width:100px;
padding:15px;
text-align:center;
color:#000000;
font-family: arial, sans-serif;
}
.green {background-color: green;}
.blue {background-color: blue;}
.gray {background-color: gray;}
.pink {background-color: pink;}
</style>
</head>
<body>
<h2>Пример свойства flex</h2>
<div class="box">
<div class="green">GREEN</div>
<div class="blue">BLUE</div>
<div class="gray">GRAY</div>
<div class="pink">PINK</div>
</div>