Last active
September 29, 2018 03:55
-
-
Save wangbinyq/b40ce6491a8cafa33672d682df623e0d to your computer and use it in GitHub Desktop.
flex column fill row and overflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>flex example</title> | |
| <link href="https://cdn.bootcss.com/basscss/8.0.4/css/basscss.min.css" rel="stylesheet"> | |
| <style> | |
| html, body { | |
| padding: 0; | |
| margin: 0; | |
| height: 100%; | |
| } | |
| .full { | |
| height: 100%; | |
| width: 100%; | |
| } | |
| .red { | |
| background: rgba(255, 0, 0, 0.2); | |
| } | |
| .green { | |
| background: rgba(0, 255, 0, 0.2); | |
| } | |
| .blue { | |
| background: rgba(0, 0, 255, 0.2); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="full flex flex-column"> | |
| <div class="red" style="height: 200px"></div> | |
| <div class="blue" style="overflow: auto; flex: 1"> | |
| <div style="height: 2000px;"></div> | |
| </div> | |
| <div class="green" style="height: 200px;"></div> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment