Answers for "grid auto-fit in css"

CSS
1

autofit grid css

.grid {
   display: grid;
  grid-template-columns: repeat(auto-fit, 1fr);
}
Posted by: Guest on December-05-2020
1

fit image in grid css

.photo > img {
  object-fit: cover;
  width: 100%;
  max-height: 100%;
}
Posted by: Guest on April-12-2021
0

fit image in grid css

.photo > img {
  object-fit: cover;
  width: 100%;
}
Posted by: Guest on April-12-2021

Browse Popular Code Answers by Language