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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console