* {
margin: 0;
padding:0;
box-sizing: border-box;
}
body {
padding: 50px; // cu asta punem padding in jur la tot
}
.grid {
display: grid;
grid-template-columns: repeat(5, 1fr); // creem 5 coloane (care vor avea 6 linii)
grid-template-rows: 80px 250px 120px 80px; // creem 4 randuri. observa ca primul si ultimul sunt mai mici. plus ca inaltimea la tot gridul e data din grid template-rows
width: 100%;
}
// da inspect element pe grid. observa liniiletre care iti vor aparea si vei observa gridul ce l-am desenat azi
.carousel-back {
grid-column-start: 1; // ce am povestit la lucru
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 5;
background: orange;
}
.carousel-front {
grid-column-start: 2;
grid-column-end: 6;
grid-row-start: 2;
grid-row-end: 4;
background: purple;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.