Answers for "responsive background image"

22

background image size css

#example1 {
  background: url(mountain.jpg);
  background-repeat: no-repeat;
  background-size: auto;
}

#example2 {
  background: url(mountain.jpg);
  background-repeat: no-repeat;
  background-size: 300px 100px;
}
Posted by: Guest on May-28-2020
0

css responsive background

/* fill the entire container and crop the image if needed */
background-size: cover;
/* fit the image inside the container */
background-size: contain;
Posted by: Guest on July-06-2021
-2

Scaling Images and Videos css

.container {
  width: 50%;
  height: 200px;
  overflow: hidden;
}

.container img {
  max-width: 100%;
  height: auto;
  display: block;
}
Posted by: Guest on May-03-2020
0

background shrinks when responsive

html,
body {
	width: 100%;
	height: 100%;
	margin: 0px;
	padding: 0px;
	overflow-x: hidden;
}
Posted by: Guest on October-14-2020
-2

making image responsive

<p>
  <a href="MY WEBSITE LINK" target="_blank">
    <img src="IMAGE LINK" style='width:100%;' border="0" alt="Null">
  </a>
</p>
Posted by: Guest on September-11-2020

Code answers related to "responsive background image"

Browse Popular Code Answers by Language