Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!--右に吹き出しが欲しいとき-->
<div class="fuki-box">
  <div class="fuki-img l-img class-1"></div>
  <div class="r-fuki right">吹き出しの中の文字</div>
</div>
<!--左に吹き出しが欲しいとき-->
<div class="fuki-box">
  <div class="fuki-img r-img class-2"></div>
  <div class="l-fuki">吹き出しの中の文字</div>
</div>
              
            
!

CSS

              
                /* アイコンと吹き出しを囲むdiv */
.fuki-box{
    display: flex;
    justify-content: center;
    margin: 20px 0.2em 20px;
}
/* アイコン */
.fuki-img{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    background-size: 100% !important;
    box-shadow: 1px 1px 5px #aaa;
}
/* アイコンの名前 */
.fuki-img::after{
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    text-align: center;
    font-size: .7em;
    color: #333;
}
/* アイコンの順番 */
.l-img{
    order: 1;
}
.r-img{
    order: 2;
}
/* 吹き出し */
.r-fuki,.l-fuki{
    border-radius: 12px;
    border: 3px solid #ddd;
    flex: 1; 
    padding: 1em;
    position: relative;
    z-index: 1;
    min-height: 3em;
}
/* 右の吹き出しのmarginと順番 */
.r-fuki{
    margin-left: 1em;
    /* スマホで消去 */
    margin-right: 95px;
    order: 2;
}
/* 左の吹き出しのmarginと順番 */
.l-fuki{
    margin-right: 1em;
    /* スマホで消去 */
    margin-left: 95px;
    order: 1;
}
/* 吹き出しのとんがり部分 */
.r-fuki::before,.l-fuki::before{
    position: absolute;
    content: "";
    top: 16px;
    width: 10px;
    height: 10px;
    border-right: 3px solid #ddd;
    border-bottom: 3px solid #ddd;
    z-index: 2;
    background: #fff;
}

.l-fuki::before{
    right: -8px;
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
}

.r-fuki::before{
    left: -8px;
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
}

/* 画像とアイコンの名前 */
.class-1{background:url(https://cdn-ak.f.st-hatena.com/images/fotolife/a/asobitukusou/20200301/20200301084122.jpg);}
.class-1::after{
  content: "sample";
}
.class-2{background:url(https://cdn-ak.f.st-hatena.com/images/fotolife/a/asobitukusou/20200301/20200301095750.jpg);}
.class-2::after{
  content: "sample2";
}
              
            
!

JS

              
                
              
            
!
999px

Console