Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import './MyComp.css'
- export default class MyComp extends React.Component {
- render() {
- return (
- <div className="wrapp">
- <div className="greenBlock">
- <h1>green </h1>
- </div>
- <div className="yellowBlock">
- <h1>yellow </h1>
- </div>
- </div>
- );
- }
- }
- .wrapp,
- html,
- body {
- height: 100%;
- margin: 0;
- }
- .wrapp {
- display: flex;
- flex-direction: column;
- }
- .greenBlock {
- background-color: green;
- flex: 0.25
- }
- .yellowBlock {
- background-color: yellow;
- flex: 0.75
- }
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement