HTML background image full screen responsive
HTML Tutorial » HTML background image full screen responsive
The following example shows a full-screen responsive background image. Making the background of a web page we will use the following CSS attributes:
background: url(https://www.agernic.com/uploads/css-background-image-size-fit-full-screen.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
Syntax:
Syntax: External CSS.
background: value;
-webkit-background-size: value;
-moz-background-size: value;
-o-background-size: value;
background-size: value;
-webkit-background-size: value;
-moz-background-size: value;
-o-background-size: value;
background-size: value;
Note: use external CSS instead.
How to create HTML background image full screen responsive - examples
You can try to execute the following code.
Example:
Example 1, How to create HTML background image full screen responsive
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body, html {
/* Center and scale the image nicely */
background: url(https://www.agernic.com/uploads/css-background-image-size-fit-full-screen.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.text {
color:#EEE;
font-family: Verdana, Geneva, sans-serif;
font-size: 18px;
font-weight: bold;
padding: 26px;
}
.text2 {
color:#999;
font-family: Verdana, Geneva, sans-serif;
font-size: 18px;
font-weight: bold;
padding-top: 1000px;
padding-right: 26px;
padding-bottom: 26px;
padding-left: 26px;
}
</style>
</head>
<body>
<div class="text">
<p>This example creates a full page background image. Try to resize the browser window to see how it always will cover the full screen </p>
<p>This example creates a full page background image. Try to resize the browser window to see how it always will cover the full screen (when scrolled to top), and that it scales nicely on all screen sizes.</p>
</div>
<div class="text2">
<p>This example creates a full page background image. Try to resize the browser window to see how it always will cover the full screen </p>
</div>
</body>
</html>
Note: Use external CSS instead.
Html background image full screen, CSS background image, Responsive background-image CSS Tricks, Fit background image to screen CSS, Css background image cover full page, Perfect full background image css tricks, Css background image size to fit screen, Background doesn t fill screen css
HTML background Image full screen responsive - html tutorial
Online Editor
This tool makes it easy to create, adjust, and experiment with custom colors for the web.
HTML Templates

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.
CSS HTML Layout

Find here examples of creative and unique website layouts.
Free CSS HTML Menu

Find here examples of creative and unique website CSS HTML menu.