cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <h5>Flex Item2だけalign-self:auto;</h5>
<div class="flexContainer01">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
<h5>Flex Item2だけalign-self:flex-start;</h5>
<div class="flexContainer02">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
<h5>Flex Item2だけalign-self:flex-end;</h5>
<div class="flexContainer03">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
<h5>Flex Item2だけalign-self:center;</h5>
<div class="flexContainer04">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
<h5>Flex Item2だけalign-self:baseline;</h5>
<div class="flexContainer05">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
<h5>Flex Item2だけalign-self:stretch;</h5>
<div class="flexContainer06">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
<h5>Flex containerにはalign-items:flex-end;を指定、Flex Item2だけalign-self:stretch;にすると優先される</h5>
<div class="flexContainer07">
<div class="flexItem1">Flex Item1</div>
<div class="flexItem2">Flex Item2</div>
<div class="flexItem3">Flex Item3</div>
</div>
            
          
!
            
              .flexContainer01{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
}
.flexContainer01 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer01 .flexItem2{
  align-self:auto;
}

.flexContainer02{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
}
.flexContainer02 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer02 .flexItem2{
  align-self:flex-start;
}

.flexContainer03{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
}
.flexContainer03 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer03 .flexItem2{
  align-self:flex-end;
}

.flexContainer04{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
}
.flexContainer04 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer04 .flexItem2{
  align-self:center;
}

.flexContainer05{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
}
.flexContainer05 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer05 .flexItem2{
  align-self:baseline;
}

.flexContainer06{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
}
.flexContainer06 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer06 .flexItem2{
  align-self:stretch;
}

.flexContainer07{
  background:#f5ebd7;
  display:flex;/*子要素がFlex itemになる*/
  height:200px;
  align-items:flex-end;
}
.flexContainer07 div{
  border:1px solid #fff;
  padding:20px;
  background:#534a47;
  color:#fff;
  width:200px;
  text-align:center;
}
.flexContainer07 .flexItem2{
  align-self:stretch;
}
            
          
!
999px
Loading ..................

Console