A Pen by Karla Grajales on CodePen.
Last active
September 3, 2024 17:25
-
-
Save Grajales-K/8c7b3da7cc2c5179ceb7aa06b75bca4b to your computer and use it in GitHub Desktop.
responsive-image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- <div class="wrapper"> | |
<div class="card-image"> | |
<img src=https://images.unsplash.com/photo-1535141192574-5d4897c12636?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1976&q=80> | |
</div> | |
<p> donate your clothes today | |
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Corporis magnam ea corrupti est vel quae harum fugit odio maiores eaque.</p> | |
<div> --> | |
<div class="wrapper"> | |
<div class="card-image"> | |
<img src="https://images.unsplash.com/photo-1535141192574-5d4897c12636?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1976&q=80"> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrapper { | |
width: 50%; | |
background-color: yellow; | |
margin: auto; | |
position: absolute; | |
} | |
.card-image { | |
width: 75%; | |
/* padding-bottom: 10%; */ | |
position: relative; | |
} | |
.card-image img { | |
width: 100%; | |
height: 100%; | |
object-fit: cover; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment