Answers for "scale an images css"

CSS
1

how to resize img in css

.whatever {
  width: 500px;
  height: 400px;
  background-image: url('myurl.jpg');
  background-size: cover;
}
Posted by: Guest on January-16-2022
1

scale down image css

img.resize {
    width: 540px; /* you can use % */
    height: auto;
}
Posted by: Guest on January-29-2021

Browse Popular Code Answers by Language