<div class="wrapper">
<header class="header">Card Component</header>
<section class="content">
<div class="card">
<img class="card__image" src="https://source.unsplash.com/WLUHO9A_xik/1600x900" alt="default card image" />
<h1 class="card__title">Default Card</h1>
<p class="card_para">Default card description...</p>
</div>
<div class="card card--dark">
<img class="card__image" src="https://source.unsplash.com/WLUHO9A_xik/1600x900" alt="default card image" />
<h1 class="card__title">Dark Card</h1>
<p class="card_para">Dard card description...</p>
</div>
</section>
<footer class="content__footer">vish448.github.io</footer>
</div>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
.wrapper {
margin: 4%;
}
header {
margin: 40px 20px;
font-size: 2rem;
font-weight: bold;
text-align: center;
}
.content {
display: flex;
flex-direction: row;
}
.card {
box-shadow: 0px 0px 50px lightgrey;
padding: 0.7em;
margin:1em;
width: 50%;
}
.card__image {
width: 100%;
}
.card__title {
font-weight: bold;
}
.content__footer {
padding: 40px;
text-align: center;
font-family: Montserrat;
font-style: normal;
font-weight: 600;
font-size: 14px;
line-height: 17px;
color: #333333;
}
.card--dark {
box-shadow: 0px 0px 10px greenyellow;
background: grey;
color: white;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.