Answers for "background image css responsive"

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
-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

Code answers related to "background image css responsive"

Browse Popular Code Answers by Language