flex-container
بازگشت به صفحه اصلی
بازگشت به صفحه مقاله
دو ستونی
دو سطری
اجرای کد RUN »
<!DOCTYPE html> <html> <head> <style> .flex-container { display: flex; background-color: #f1f1f1; } .flex-container > div { background-color: DodgerBlue; color: white; width: 100px; margin: 10px; text-align: center; line-height: 75px; font-size: 30px; } </style> </head> <body> <h1>Flexible Items</h1> <div class="flex-container"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> <p>All direct children of a flexible container becomes flexible items.</p> </body> </html>