Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Der Titel des Dokuments</title> <style> #flex { width: 300px; height: 100px; border: 1px solid #c3c3c3; display: -webkit-flex; /* Safari */ -webkit-justify-content: center; /* Safari 6.1+ */ display: flex; justify-content: center; } div { width: 70px; height: 70px; } </style> </head> <body> <h2>Ein Beispiel für die Eigenschaft display</h2> <p>Hier wird "display: flex;" verwendet:</p> <div id="flex"> <div style="background-color: #1c87c9;">1</div> <div style="background-color: #666;">2</div> <div style="background-color: #8ebf42;">3</div> </div> </body> </html>