Answers for "set a background image to full html page"

CSS
3

html background image fit to screen

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
Posted by: Guest on May-11-2020
1

how to set a full size background image in html

<head>
<style>
#example1{
  border: 2px solid black;
  padding: 100px;
  background: url(mountain.jpg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
</style>
</head>
<body>
<div id="example1">
</div>
</body>
Posted by: Guest on June-06-2020

Code answers related to "set a background image to full html page"

Browse Popular Code Answers by Language