Detailed explanation of CSS3 flex box automatic filling writing

Detailed explanation of CSS3 flex box automatic filling writing

This article mainly introduces the detailed explanation of the automatic filling writing method of CSS3 flex elastic box, and shares it with you, as follows:

<style type="text/css">
    .flexcontainer{
        width:100%;
        height: 100%;
        position: absolute;
        left:0px;
        top:0px;
        display: flex;
        flex-direction: column;
    }
    .flex1 {
        width: 100%;
        height: 8rem;
        float: left;
        background: #f00;
    
    }
    .flex2 {
        width: 100%;
        height: 4rem;
        flex:1;
        float: left;
        background: #000;
    }
   .flex3 {
        width: 100%;
        height: 7rem;
        float: left;
        background: #ccc;
    }    
</style>
<div class="flexcontainer">
    <div class="flex1"></div>
    <div class="flex2"></div>
    <div class="flex3"></div>
</div>

This is the end of this article on the detailed explanation of how to write automatic filling of CSS3 flex elastic box. For more relevant CSS3 flex automatic filling content, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  Detailed explanation of tinyMCE usage and experience

>>:  Use IISMonitor to monitor web pages and automatically restart IIS

Recommend

Details of using Vue slot

Table of contents 1. Why use slots? 1.1 slot 1.2 ...

Solution to the garbled problem of web pages when the encoding is set to utf-8

Recently, when I was writing web pages with PHP, I...

Solve the problem of docker log mounting

The key is that the local server does not have wr...

MySQL 5.7.18 installation and configuration method graphic tutorial (CentOS7)

How to install MySQL 5.7.18 on Linux 1. Download ...

Detailed explanation of VUE responsiveness principle

Table of contents 1. Responsive principle foundat...

Solution to the problem of adaptive height and width of css display table

Definition and Usage The display property specifi...

Nginx external network access intranet site configuration operation

background: The site is separated from the front ...

mysql method to view the currently used configuration file my.cnf (recommended)

my.cnf is the configuration file loaded when MySQ...

A brief discussion on the placement of script in HTML

I used to think that script could be placed anywh...