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="media" dir="ltr">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/blueberry-cheesecake.jpg" alt="蓝莓芝士蛋糕" class="media__object">
  <div class="media__body">
    <h3 class="media__heading">蓝莓芝士蛋糕</h3>
    <p>食谱描述的地方, 食谱描述的地方, 食谱描述的地方, 食谱描述的地方</p>
  </div>
</div>

  <div class="media" dir="ltr">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/blueberry-cheesecake.jpg" alt="蓝莓芝士蛋糕" class="media__object">
  <div class="media__body">
    <h3 class="media__heading">To Deal with Right-to-Left</h3>
    <p>Know what goes into your markup and what goes into your style sheets. </p>
  </div>
</div>

<div class="media" dir="rtl">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/blueberry-cheesecake.jpg" alt="فطيرة الجبن بالتوت البري" class="media__object">
  <div class="media__body">
    <h3 class="media__heading">فطيرة الجبن بالتوت  فطيرة </h3>
          <p>هنا سيكون شرح معين عن هذه الوصفة. هنا سيكون شرح معين عن هذه الوصفة. هنا سيكون شرح معين عن هذه الوصفة</p>
  </div>
</div>

<div class="media" dir="rtl">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/182774/blueberry-cheesecake.jpg" alt="فطيرة الجبن بالتوت البري" class="media__object">
  <div class="media__body">
    <h3 class="media__heading">فطيرة الجبن بالتوت  فطيرة </h3>
          <p>هنا سيكون شرح معين عن هذه الوصفة. هنا سيكون شرح معين عن هذه الوصفة. هنا سيكون شرح معين عن هذه الوصفة</p>
  </div>
</div>

              
            
!

CSS

              
                body {
   color: #fff;
   background-color: #101010;
   width: 100vw;
   min-height: 100vh;
   display: flex;
   padding: 6vh;
   margin: 0;
   justify-content: center;
   align-items: flex-start;
   flex-wrap: wrap;
   box-sizing: border-box;
 }


.media {
  background: #2196F3;
  box-shadow: 0 3px 10px 0 rgba(33, 149, 243, 0.64);
  padding: 2vh;
  margin: 3vh;
  border-radius: 10px;
  min-width: 30vw;
  max-width: 30vw;
  display: grid;
  position: relative;
  grid-template-columns: 10vw 1fr;
  gap: 2vw;
  
  h3 {
    font-size: 24px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
  
  img {
    width: 10vw;
    height: 10vw;
    border-radius: 50%;
    border: 1px solid #a0161694;
    box-shadow: inset 2vh 2vh 2vh rgba(203, 32, 32, 0.75);
  }
  
  p {
    letter-spacing: 2px;
    line-height: 1.5;
  }
}

.media:last-child p {
  letter-spacing: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console