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

              
                <h1 class="title"><span class="pastille"><span class="texte">h1, span, pastille et pseudo-élement</span></span></h1>

<p>Objectif du code :</p>
<ul>
  <li>Mettre un rectangle arrondi de la même longueur que le texte + un peu de padding ;</li>
  <li>Incliner ce rectangle de moins trois degrés sans incliner le texte ;</li>
</ul>
<p>NB : en nommant les éléments avec des classes, je peux changer le h1 en h2… et réutiliser celle-ci.</p>
<p>Cet effet est offert par <a href="https://jenseign.com">jenseign.com</a></p>

              
            
!

CSS

              
                html{
  background: #000;
  height:100%; /* pour la marge scolaire */
}
body{
  margin:0 0 0 200px;  /* marge scolaire */
  border-left:1px solid #333; /* ligne de marge */
  height:100%; /* obligatoire pour la taille de la ligne */
  max-width:900px; /* largeur max */
  padding-top:48px; /* on décolle du haut */
  font-family: sans-serif;
  color:#fff;
  font-size: 18px;
  line-height:1.5;
}

a{
  color:#fff;
}

.pastille{
  position:relative;
  display:inline-block;
}
.pastille:before{
  content:' ';
  background: #f60; /* orange */
  padding:7px 12px; /* on gonfle le bloc 7px en haut+bas 9px en droite+gauche*/
  border-radius:7px; /* 4 coins arrondis */
  transform:rotate(-3deg); /* on tourne */
  position:absolute;
  top:0;
  bottom:0;
  right:-9px;
  left:-9px;
}

.texte{
   display:inline-block;
   transform:rotate(0);
}

              
            
!

JS

              
                
              
            
!
999px

Console