Answers for "background cover image html"

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

how to cover whole webpage by background image in html

background: url(images/bg.jpg) no-repeat center center fixed; 
  background-size: cover;
Posted by: Guest on November-26-2020

Browse Popular Code Answers by Language