Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import React from 'react';
  2. import './MyComp.css'
  3.  
  4. export default class MyComp extends React.Component {
  5. render() {
  6. return (
  7. <div className="wrapp">
  8. <div className="greenBlock">
  9. <h1>green </h1>
  10. </div>
  11. <div className="yellowBlock">
  12. <h1>yellow </h1>
  13. </div>
  14. </div>
  15. );
  16. }
  17. }
  18.  
  19. .wrapp,
  20. html,
  21. body {
  22. height: 100%;
  23. margin: 0;
  24. }
  25.  
  26. .wrapp {
  27. display: flex;
  28. flex-direction: column;
  29. }
  30.  
  31. .greenBlock {
  32. background-color: green;
  33. flex: 0.25
  34. }
  35.  
  36. .yellowBlock {
  37. background-color: yellow;
  38. flex: 0.75
  39. }
  40. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement