JSFiddle - React, Tailwind, and code Playground

by tsayen

HTML

<p>Flexbox nuovo</p>
  <div class="flex">
    <div>uno</div>
    <div>due</div>
    <div>tre</div>
  </div>

CSS

.flex
   {
      /* basic styling */
      width: 200px;
      height: 300px;
      border: 1px solid #555;
      font: 14px Arial;

      /* flexbox setup */
      display: flex;
      flex-direction: column;
   }

   .flex > div
   {
      flex: 1 1 auto;

      height: 30px; /* To make the transition work nicely.  (Transitions to/from
                      "width:auto" are buggy in Gecko and Webkit, at least.
                      See http://bugzil.la/731886 for more info.) */

/*       -webkit-transition: width 0.7s ease-out;
      transition: width 0.7s ease-out; */
   }

   /* colors */
   .flex > div:nth-child(1){ background : #009246; }
   .flex > div:nth-child(2){ background : #F1F2F1; }
   .flex > div:nth-child(3){ background : #CE2B37; }

   .flex > div:hover
   {
        height: 50%;
   }