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

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

              
                <section>
<div class="container">
	<div class="align bloc1">○</div>
	<div class="align bloc2">○</div>
	<div class="align bloc3">○</div>
	<div class="align bloc4">○</div>
	<div class="align bloc5">○</div>
	<div class="align bloc6">○</div>
</div>
</section>
              
            
!

CSS

              
                * {
	margin: 0;
	padding: 0;
}

body {
	background-color:#212121;
	color:#212121;
	font-size:2em;
}

/*Pour centrer le contenu à l'intérieur des blocs*/
.align {
	display: flex;
  justify-content: center;
  align-items: center;
}

/*La section sert à centrer le container (grille) dans la page avec flexbox*/
section {
	height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/*la grille*/
.container {
	transform: rotate(-45deg);/*tourner le container*/
	border:5px solid #616161;/*une bordure autour du container*/
	display: grid;
	grid-template-columns: 200px 200px 200px;
	grid-template-rows: 200px 200px;
	/*goutières des colonnes et lignes*/
	column-gap:5px;
	row-gap:5px;
}

/*les blocs et les couleurs des fonds*/
.bloc1 {
	background-color:#F6BD60;
}
.bloc2 {
	background-color:#F7EDE2;
}
.bloc3 {
	background-color:#F5CAC3;
}
.bloc4 {
	background-color:#EDE7F6;
}
.bloc5 {
	background-color:#84A59D;
}
.bloc6 {
	background-color:#F28482;
}

/*
Pour adapter la grille pour le smartphone : 
-on enlève la rotation
-on change la taille des blocs
-on enlève les goutières
*/
@media only screen and (max-width: 767px) { 
		.container {
				transform:rotate(0deg);
				grid-template-columns: 100px 100px 100px;
				grid-template-rows: 100px 100px;
				column-gap:0px;
				row-gap:0px;
		}
}
              
            
!

JS

              
                
              
            
!
999px

Console