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

              
                <!----------------------------------------------------------------
Importer Tailwind via CDN
------------------------------------------------------------------>
<script src="https://cdn.tailwindcss.com"></script>

<!------------------------------------------------
Retrouvez ici toutes les classes utilitaires concernant les effets visuels avec Tailwind
-------------------------------------------------->


<!----------------------------------------------------------------
Créer une ombre portée sur un élémen
------------------------------------------------------------------>
<div class="titre">Créer une ombre portée sur un élément</div>

<section class="flex mx-40 justify-around"> 
    <div class="bg-blue-500 text-white p-4 w-32 h-32 shadow-2xl">Élément 1</div>
    <div class="bg-red-500 text-white p-4 w-32 h-32 shadow-lg shadow-red-500/30 ">Élément 2</div>
    <div class="bg-green-500 text-white p-4 w-32 h-32 shadow-[5px_5px_rgba(0,_98,_90,_0.4),_10px_10px_rgba(0,_98,_90,_0.3),_15px_15px_rgba(0,_98,_90,_0.2),_20px_20px_rgba(0,_98,_90,_0.1),_25px_25px_rgba(0,_98,_90,_0.05)] ">Élément 3</div>
</section>

<!----------------------------------------------------------------
Contrôler la visibilité d’un élément
------------------------------------------------------------------>
<div class="titre">Contrôler la visibilité d’un élément</div>

<section class="flex mx-40 justify-around"> 
    <div class="bg-red-500 text-white p-4 w-32 h-32 opacity-25">Élément 1</div>
    <div class="bg-red-500 text-white p-4 w-32 h-32 opacity-50">Élément 2</div>
    <div class="bg-red-500 text-white p-4 w-32 h-32 opacity-100">Élément 3</div>
</section>

<!----------------------------------------------------------------
Transformer la taille d’un élément
------------------------------------------------------------------>
<div class="titre">Transformer la taille d’un élément</div>

<section class="grid grid-cols-3 mx-auto w-max gap-x-40 gap-y-10">
  <div class="bg-green-500 text-white p-4 w-32 h-32 scale-75"></div>
  <div class="bg-green-500 text-white p-4 w-32 h-32 scale-100"></div>
  <div class="bg-green-500 text-white p-4 w-32 h-32 scale-150"></div>
  
  <div class="bg-green-500 text-white p-4 w-32 h-32 scale-y-75"></div>
  <div class="bg-green-500 text-white p-4 w-32 h-32 scale-x-125"></div>
  <div class="bg-green-500 text-white p-4 w-32 h-32  scale-x-25 scale-y-75"></div>
</section>

<!----------------------------------------------------------------
Faire pivoter un élément
------------------------------------------------------------------>
<div class="titre">Faire pivoter un élément</div>

<section class="flex flex-row justify-around m-10 mx-40">
  <img src="https://img.freepik.com/photos-gratuite/fleche-blanche-fond-minimaliste-orange_23-2148445339.jpg?t=st=1729340475~exp=1729344075~hmac=57a1bafec60f6fdd320ef50b4864a5bd8f28308673e25fc79eac48b9cd3fa82f&w=1060" class="w-32 h-32 rotate-0">
  
  <img src="https://img.freepik.com/photos-gratuite/fleche-blanche-fond-minimaliste-orange_23-2148445339.jpg?t=st=1729340475~exp=1729344075~hmac=57a1bafec60f6fdd320ef50b4864a5bd8f28308673e25fc79eac48b9cd3fa82f&w=1060" class="w-32 h-32 rotate-45">
 
  <img src="https://img.freepik.com/photos-gratuite/fleche-blanche-fond-minimaliste-orange_23-2148445339.jpg?t=st=1729340475~exp=1729344075~hmac=57a1bafec60f6fdd320ef50b4864a5bd8f28308673e25fc79eac48b9cd3fa82f&w=1060" class="w-32 h-32 rotate-90">
  

</section>


              
            
!

CSS

              
                /********************************************
Ici se trouve les classes CSS utilisées pour mettre en forme la présentation du CodePen
********************************************/

.titre{
  font-size : 2rem;
  margin-bottom : 1em;
  margin-top: 1em;
  text-align : center;
}
              
            
!

JS

              
                
              
            
!
999px

Console