img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
img {
display: block;
max-width:230px;
max-height:95px;
width: auto;
height: auto;
}
.image-full {
background: url(...some image...) no-repeat;
background-size: cover;
background-position: center center;
}
/* Simply add width without height,
aspect ratio will be maintained
and height will be calculated accordingly*/
img {
width: 100px;
}
Code Example |
---|
Css :: css right |
Css :: css horizontal scroll cards |
Css :: datatables width 100% not working |
Css :: chenge number of lines of text in css |
Css :: custom select tailwind css |
Css :: horizontal scroll |
Css :: change font size according to screen css |
Css :: box shadow css property |
Css :: outline radius css |
Css :: center wrapped flex children |
Css :: how to call media query inside css class |
Css :: css bold |
Css :: add css to class=["col-"] |
Css :: css animation top goes back to start |
Css :: purgecss cli |
Css :: css move animation |
Css :: how to set text to middle in div |
Css :: the background image properties in css |
Css :: color code css |
Css :: image responsive css |
Css :: css for background color |
Css :: css square image |
Css :: border css shorthand |
Css :: add dots instead of line break in css |
Css :: line cap css |
Css :: how to center a position fixed element horizontally |
Css :: vh and vw |
Css :: css disabled |
Css :: internal style |
Css :: css gradient background |