CSS3: Putting an order to a flex box

This entry is part 13 of 13 in the series CSS3

If we want a particular flex box to be in the first order, we could use order:-1.

For example, in the example below, block D will be display as the first box.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Codecrawl.com-Flexbox</title>
    <style>
        .flex-container {
            display: -webkit-flex;
            display: flex;
            width: 400px;
            height: 260px;
            background-color: gray;
            -webkit-flex-wrap: wrap;
            -moz-flex-wrap: wrap;
            flex-wrap: wrap;
        }

        .flex-item {
            background-color: Silver;
            width: 100px;
            height: 100px;
            margin: 10px;
        }

        .point0 {
            -webkit-order: -1;
            order: -1;
        }
    </style>
</head>
<body>
<div class='flex-container'>
    <div class='flex-item'>I am a content block A</div>
    <div class='flex-item'>I am a content block B</div>
    <div class='flex-item'>I am a content block C</div>
    <div class='flex-item point0'>I am a content block D</div>
    <div class='flex-item'>I am a content block E</div>
    <div class='flex-item'>I am a content block F</div>
</div>
</body>
</html>

Series Navigation<< CSS3: Flex-wrap in reverse