Answers for "add image html in css"

CSS
1

css image

/* CSS for Desktop */

.country-background-img {
  background: url('https://placeimg.com/1000/695/animals');
  background-repeat: no-repeat;
  background-size: cover;
  height: 695px;
  padding: 60px 30px 0 30px;
  margin-top: 50px;
}


/* Responsive CSS */

.country-background-img {
  height: auto;
  text-align: center;
  background-attachment: fixed;
}
Posted by: Guest on December-12-2021
0

how to add images on images css

.parent {
  position: relative;
  top: 0;
  left: 0;
}
.image1 {
  position: relative;
  top: 0;
  left: 0;
  border: 1px red solid;
}
.image2 {
  position: absolute;
  top: 30px;
  left: 30px;
  border: 1px green solid;
}
Posted by: Guest on September-04-2020

Browse Popular Code Answers by Language