scrimba
UI Design
Gradients
Challenge 4: Card Gradients (Light Variation)
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Challenge 4: Card Gradients (Light Variation)
AboutCommentsNotes
Challenge 4: Card Gradients (Light Variation)
Expand for more info
index.css
run
preview
console
html, body {
margin: 0;
padding: 0;
}

body {
background: linear-gradient(304deg, rgba(104,29,253,1) 0%, rgba(141,0,222,1) 100%);
display: grid;
justify-content: center;
height: 100vh;
place-content: center;
}

.container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
background: white;
background: linear-gradient(137deg, rgba(255,255,255,1) 43%, rgba(160,135,255,1) 100%);
margin: 1.5em;
padding: 1.5em;
border-radius: 1em;
text-align: center;
color: #15004C;
position: relative;
box-shadow: 10px 10px 30px rgba(0,0,0,.2);
}

span {
position: absolute;
width: 60px;
height: 60px;
background: white;
margin-top: -3em;
border-radius: 50%;
background: #E6C9FF;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}

p {
margin-top: 2em;
font-size: .9em;
line-height: 1.5em;
}

a {
font-weight: bold;
text-decoration: none;
display: block;
margin-top: 1em;
}
Console
/index.html
-3:46