Hallo zusammen,
ich habe ein Problem mit Flexbox :-(
Kurz und Knapp, wie bekomme ich 3 Elemente in eine Zeile?
Wie schafft man es das Elemente 2x schneller wachsen oder schrumpfen?
Hier mal der Code:
Die Roten Kästchen sollen 2x schneller wachsen und die Gelben sollen 2x schneller schrumpfen.
ich habe ein Problem mit Flexbox :-(
Kurz und Knapp, wie bekomme ich 3 Elemente in eine Zeile?
Wie schafft man es das Elemente 2x schneller wachsen oder schrumpfen?
Hier mal der Code:
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Index</title>
<style>
#container {
display: flex;
flex-wrap: wrap;
list-style-type: none;
margin: 0;
padding: 0;
}
.out {
background: yellow;
padding: 5px;
width: 200px;
height: 150px;
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
line-height: 150px;
color: white;
font-weight: bold;
font-size: 3em;
text-align: center;
flex-grow: 1;
}
.in {
background: red;
padding: 5px;
width: 200px;
height: 150px;
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
line-height: 150px;
color: white;
font-weight: bold;
font-size: 3em;
text-align: center;
flex-grow: 2;
}
</style>
</head>
<body>
<ul id="container">
<li class="out">1</li>
<li class="in">2</li>
<li class="out">3</li>
<li class="out">1</li>
<li class="in">2</li>
<li class="out">3</li>
<li class="out">1</li>
<li class="in">2</li>
<li class="out">3</li>
</ul>
</body>
</html>
Die Roten Kästchen sollen 2x schneller wachsen und die Gelben sollen 2x schneller schrumpfen.