Answers for "css transform image to square"

CSS
4

css square image

/* THE HTML  */
<div class="thumb1"> </div>
/* THE CSS */
.thumb1 { 
  background: url(blah.jpg) 50% 50% no-repeat; /* 50% 50% centers image in div */
  width: 250px;
  height: 250px;
}

.thumb1:hover { 
/* HOVER STYLE HERE */
}
Posted by: Guest on April-12-2021

Browse Popular Code Answers by Language