AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

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;
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
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news 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
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news 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
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Send forgot password by mail or message ...
PHP MySQL simple login system...
Check for duplicate username live or ema...
How to create simple search engine using...
Diseño de sitio web CSS Layout...
Diseño de caja flexible CSS3...
Botones en CSS...
ID y Clase, Diferencias entre Class e Id...
Esquina redondeada CSS...
Tamaño de caja css box-sizing: border-b...
Alineación CSS...
Altura y Anchura CSS...
Bordes CSS...
Margen CSS...
Relleno CSS...
Modelo de caja CSS...
Tablas CSS...
Listas CSS...
Enlaces CSS...
Texto CSS...