Pen Settings

HTML

CSS

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.

+ 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

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.

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="section">

  <div class="one">

    <section id="s_brightness_01">
      <div class="s_brightness_01 oneBox">
        <figure><img src="https://125naroom.com/wp/wp-content/themes/design125naroom/img/home/125naroom_004.png"></figure>
      </div>
      <p class="sample_title">ホバー、明度を上げる、105%</p>
    </section>

    <section id="s_brightness_02">
      <div class="s_brightness_02 oneBox">
        <figure><img src="https://125naroom.com/wp/wp-content/themes/design125naroom/img/home/125naroom_004.png"></figure>
      </div>
      <p class="sample_title">ホバー、明度を上げる、110%</p>
    </section>

    <section id="s_brightness_03">
      <div class="s_brightness_03 oneBox">
        <figure><img src="https://125naroom.com/wp/wp-content/themes/design125naroom/img/home/125naroom_004.png"></figure>
      </div>
      <p class="sample_title">ホバー、明度を上げる、115%</p>
    </section>

    <section id="s_brightness_04">
      <div class="s_brightness_04 oneBox">
        <figure><img src="https://125naroom.com/wp/wp-content/themes/design125naroom/img/home/125naroom_004.png"></figure>
      </div>
      <p class="sample_title">ホバー、明度を下げる、80%</p>
    </section>

    <section id="s_brightness_05">
      <div class="s_brightness_05 oneBox">
        <figure><img src="https://125naroom.com/wp/wp-content/themes/design125naroom/img/home/125naroom_004.png"></figure>
      </div>
      <p class="sample_title">ホバー、明度を下げる、50%</p>
    </section>

    <section id="s_brightness_06">
      <div class="s_brightness_06 oneBox">
        <figure><img src="https://125naroom.com/wp/wp-content/themes/design125naroom/img/home/125naroom_004.png"></figure>
      </div>
      <p class="sample_title">ホバー、真っ黒にしてみる</p>
    </section>

  </div>

  <p class="_a"><a href="https://125naroom.com/web/3017" target="_blank" class="link">View the note</a></p>
</div>
              
            
!

CSS

              
                /*====================================================================
ホバー、明度を上げる、105%
====================================================================*/
.s_brightness_01 figure img {
  transition: .3s ease-in-out;
}
.s_brightness_01 figure:hover img {
  filter: brightness(1.05);
}

/*====================================================================
ホバー、明度を上げる、110%
====================================================================*/
.s_brightness_02 figure img {
  transition: .3s ease-in-out;
}
.s_brightness_02 figure:hover img {
  filter: brightness(1.1);
}

/*====================================================================
ホバー、明度を上げる、115%
====================================================================*/
.s_brightness_03 figure img {
  transition: .3s ease-in-out;
}
.s_brightness_03 figure:hover img {
  filter: brightness(1.15);
}

/*====================================================================
ホバー、明度を下げる、80%
====================================================================*/
.s_brightness_04 figure img {
  transition: .3s ease-in-out;
}
.s_brightness_04 figure:hover img {
  filter: brightness(80%);
}

/*====================================================================
ホバー、明度を下げる、50%
====================================================================*/
.s_brightness_05 figure img {
  transition: .3s ease-in-out;
}
.s_brightness_05 figure:hover img {
  filter: brightness(50%);
}

/*====================================================================
ホバー、真っ黒にしてみる
====================================================================*/
.s_brightness_06 figure img {
  transition: .3s ease-in-out;
}
.s_brightness_06 figure:hover img {
  filter: brightness(0);
}

/*====================================================================
.one
====================================================================*/
.one {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  box-sizing: border-box;
  padding: 1em 0;
}
.one section {
  width: fit-content;
  margin: 0 1% 40px 0;
  position: relative;
}
.one section:before {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 34px;
  height: 34px;
  color: #fff;
  background: #ed9577;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  z-index: +1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.one section .sample_title {
  font-size: 14px;
  margin: 5px 0 0;
  padding: 0;
}
.oneBox {
  width: 100%;
}
figure {
  max-width: 300px;
  height: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
figure img {
  width: 100%;
}

/* 1 2 3 4 5 ... */
div:nth-of-type(1) section {
  counter-increment: section;
}
div:nth-of-type(1) section:before {
  content: counter(section);
}

/*====================================================================
以下は不要です。
====================================================================*/
body {
  font-family: YuGothic, "游ゴシック体", "Yu Gothic", "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
  font-size: 16px;
  letter-spacing: .025em;
  line-height: 1.8;
  margin: 0;
}
@media screen and (max-width: 1024px) {
  body {
    font-size: 14px;
  }
}
.section {
  max-width: 1024px;
  margin: 0 auto;
  padding: 20px 20px;
}
.section p._a {
  font-size: 12px;
  font-weight: bold;
  margin: 30px 0 0;
}
.section p._a .link {
  display: inline-block;
  color: #607D8B;
  padding-left: 1.3em;
  text-indent: -1.3em;
}
.section p._a .link:before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-top: 2px solid #607D8B;
  border-right: 2px solid #607D8B;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  margin-right: 10px;
}
              
            
!

JS

              
                
              
            
!
999px

Console