Table of Contents
Common mistake: Crop a part of the background. View the demo
Example #1: Single-image background view demonstration
CSS section
Example #2: Use double background image to view the demonstration
Example #3: Use the sky image background to see the demo
Update: Use transition color sky background in HTML symbol View demo
Home Web Front-end HTML Tutorial How to use CSS to design a large background image website_html/css_WEB-ITnose

How to use CSS to design a large background image website_html/css_WEB-ITnose

Jun 24, 2016 am 11:53 AM

Let me use one or two pictures to build my own large background picture website! Since I published many CSS large background websites, I have received many emails asking how to use CSS to design a large background website. So, I thought it would be a great idea to create a tutorial to share my skills and teach you step-by-step how to design a large-scale website. This tutorial explains how to design a website with a large background, provide multiple CSS examples, and use single or multiple background images.

Common mistake: Crop a part of the background. View the demo

Please see The demo will work fine on monitors of 1280 pixels or smaller but if you have a high resolution monitor. For example, I have a 19-inch widescreen. You will see that both ends of the background are left blank.

Example #1: Single-image background view demonstration

Using my website "webdesignerw" as an example. The background image margin is actually the same as the background color of the entire page. There is a simple way to fix the problem of leaving the background blank at the front: use the same background color as the image margin (BODYbackgroundcolor here.

CSS section

The CSS here is very simple to specify the BODY background image (no-repeatcentertop is enough

Please see the CSS code:

body{padding:0;margin:0;background:#f8f7e5urlwdw- bg.jpgno-repeatcentertop;width:100%;display:table;}

Note that there are two additional feature settings. This is to prevent the background from shifting when your browser window is smaller than the image width (in Firefox). This phenomenon will occur)

Example #2: Use double background image to view the demonstration

In this example, use this website to explain in detail. Use repeated tiles of small images as the overall background.

The trick here is that the color of the large background image should be similar to the color of the small background GIF image (similar brown here)

Example #3: Use the sky image background to see the demo

and center it with a 1px wide vertical color image in the BODY. Next I use a sky image and place it in the #wrapper tag. .

Update: Use transition color sky background in HTML symbol View demo


http://bbs.house.qq.com/t-6380942-1.htm
http:// bbs.house.qq.com/t-6380984-1.htm
http://bbs.house.qq.com/t-6381041-1.htm
http://bbs.house.qq. com/t-6381062-1.htm
http://bbs.house.qq.com/t-6381091-1.htm
http://bbs.house.qq.com/t-6381210- 1.htm
http://bbs.house.qq.com/t-6381248-1.htm
http://bbs.house.qq.com/t-6381424-1.htm
http://bbs.house.qq.com/t-6381496-1.htm
http://bbs.house.qq.com/t-6381641-1.htm
http://bbs. house.qq.com/t-6381705-1.htm
http://bbs.house.qq.com/t-6381739-1.htm
http://bbs.house.qq.com/ t-6381759-1.htm
http://bbs.house.qq.com/t-6381797-1.htm
http://bbs.house.qq.com/t-6381835-1. htm
http://bbs.house.qq.com/t-6381874-1.htm
http://bbs.house.qq.com/t-6381896-1.htm
http: //bbs.house.qq.com/t-6381914-1.htm
http://bbs.house.qq.com/t-6381965-1.htm
http://bbs.house. qq.com/t-6381990-1.htm
http://bbs.house.qq.com/t-6382030-1.htm
http://bbs.house.qq.com/t- 6382066-1.htm
http://bbs.house.qq.com/t-6382111-1.htm
http://bbs.house.qq.com/t-6382212-1.htm
http://bbs.house.qq.com/t-6382276-1.htm
http://bbs.house.qq.com/t-6382311-1.htm
http:// bbs.house.qq.com/t-6382386-1.htm
http://bbs.house.qq.com/t-6382451-1.htm
http://bbs.house.qq. com/t-6382561-1.htm
http://bbs.house.qq.com/t-6382630-1.htm
http://bbs.house.qq.com/t-6382657- 1.htm
http://bbs.house.qq.com/t-6382703-1.htm
http://bbs.house.qq.com/t-6382745-1.htm
http://bbs.house.qq.com/t-6382796-1.htm
http://bbs.house.qq.com/t-6382830-1.htm
http://bbs. house.qq.com/t-6382879-1.htm
http://bbs.house.qq.com/t-6382900-1.htm
http://bbs.house.qq.com/ t-6382978-1.htm
http://bbs.house.qq.com/t-6383021-1.htm
http://bbs.house.qq.com/t-6383058-1. htm
http://bbs.house.qq.com/t-6383076-1.htm
http://bbs.house.qq.com/t-6383105-1.htm
http: //bbs.house.qq.com/t-6383123-1.htm
http://bbs.house.qq.com/t-6383213-1.htm
http://bbs.house. qq.com/t-6383237-1.htm
http://bbs.house.qq.com/t-6383271-1.htm
http://bbs.house.qq.com/t- 6383299-1.htm
http://bbs.house.qq.com/t-6383343-1.htm
http://bbs.house.qq.com/t-6383365-1.htm
http://bbs.house.qq.com/t-6383401-1.htm
http://bbs.house.qq.com/t-6383419-1.htm
http:// bbs.house.qq.com/t-6383430-1.htm
http://bbs.house.qq.com/t-6383462-1.htm
http://bbs.house.qq. com/t-6383491-1.htm
http://bbs.house.qq.com/t-6383523-1.htm
http://bbs.house.qq.com/t-6383539- 1.htm
http://bbs.house.qq.com/t-6383550-1.htm
http://bbs.house.qq.com/t-6383570-1.htm
http://bbs.house.qq.com/t-6383597-1.htm
http://bbs.house.qq.com/t-6383630-1.htm
http://bbs. house.qq.com/t-6383651-1.htm
http://bbs.house.qq.com/t-6383706-1.htm
http://bbs.house.qq.com/ t-6383722-1.htm
http://bbs.house.qq.com/t-6383751-1.htm
http://bbs.house.qq.com/t-6383801-1. htm
http://bbs.house.qq.com/t-6383820-1.htm
http://bbs.house.qq.com/t-6383860-1.htm
http: //bbs.house.qq.com/t-6383879-1.htm
http://bbs.house.qq.com/t-6383932-1.htm
http://bbs.house. qq.com/t-6383969-1.htm
http://bbs.house.qq.com/t-6384016-1.htm
http://bbs.house.qq.com/t- 6384093-1.htm
http://bbs.house.qq.com/t-6384196-1.htm
http://bbs.house.qq.com/t-6384258-1.htm
http://bbs.house.qq.com/t-6384278-1.htm
http://bbs.house.qq.com/t-6384307-1.htm
http:// bbs.house.qq.com/t-6384334-1.htm
http://bbs.house.qq.com/t-6384365-1.htm
http://bbs.house.qq. com/t-6384390-1.htm
http://bbs.house.qq.com/t-6384422-1.htm
http://bbs.house.qq.com/t-6384474- 1.htm
http://bbs.house.qq.com/t-6384505-1.htm
http://bbs.house.qq.com/t-6384563-1.htm
http://bbs.house.qq.com/t-6384606-1.htm
http://bbs.house.qq.com/t-6384625-1.htm
http://bbs. house.qq.com/t-6384692-1.htm
http://bbs.house.qq.com/t-6384731-1.htm
http://bbs.house.qq.com/ t-6384773-1.htm
http://bbs.house.qq.com/t-6384823-1.htm
http://bbs.house.qq.com/t-6384854-1. htm
http://bbs.house.qq.com/t-6384961-1.htm
http://bbs.house.qq.com/t-6385001-1.htm
http: //bbs.house.qq.com/t-6385019-1.htm
http://bbs.house.qq.com/t-6385069-1.htm
http://bbs.house. qq.com/t-6385133-1.htm
http://bbs.house.qq.com/t-6385169-1.htm
http://bbs.house.qq.com/t- 6385207-1.htm
http://bbs.house.qq.com/t-6385252-1.htm
http://bbs.house.qq.com/t-6385272-1.htm
http://bbs.house.qq.com/t-6385314-1.htm
http://bbs.house.qq.com/t-6385382-1.htm
http:// bbs.house.qq.com/t-6385481-1.htm
http://bbs.house.qq.com/t-6385524-1.htm
http://bbs.house.qq. com/t-6385632-1.htm
http://bbs.house.qq.com/t-6385656-1.htm
http://bbs.house.qq.com/t-6385699- 1.htm
http://bbs.house.qq.com/t-6385735-1.htm
http://bbs.house.qq.com/t-6385769-1.htm
http://bbs.house.qq.com/t-6385788-1.htm
http://bbs.house.qq.com/t-6385809-1.htm
http://bbs.house.qq.com/t-6385833-1.htm
http://bbs.house.qq.com/t-6385875-1.htm
http://bbs.house.qq.com/t-6385905-1.htm
http://bbs.house.qq.com/t-6385949-1.htm
http://bbs.house.qq.com/t-6385989-1.htm
http://bbs.house.qq.com/t-6386018-1.htm
http://bbs.house.qq.com/t-6386057-1.htm
http://bbs.house.qq.com/t-6386111-1.htm
http://bbs.house.qq.com/t-6386143-1.htm
http://bbs.house.qq.com/t-6386163-1.htm
http://bbs.house.qq.com/t-6386203-1.htm
http://bbs.house.qq.com/t-6386235-1.htm
http://bbs.house.qq.com/t-6386276-1.htm
http://bbs.house.qq.com/t-6386336-1.htm
http://bbs.house.qq.com/t-6386356-1.htm
http://bbs.house.qq.com/t-6386375-1.htm
http://bbs.house.qq.com/t-6386389-1.htm
http://bbs.house.qq.com/t-6386433-1.htm
http://bbs.house.qq.com/t-6386492-1.htm
http://bbs.house.qq.com/t-6386522-1.htm
http://bbs.house.qq.com/t-6386535-1.htm
http://bbs.house.qq.com/t-6386558-1.htm
http://bbs.house.qq.com/t-6386597-1.htm
http://bbs.house.qq.com/t-6386632-1.htm
http://bbs.house.qq.com/t-6386679-1.htm
http://bbs.house.qq.com/t-6386706-1.htm
http://bbs.house.qq.com/t-6386800-1.htm
http://bbs.house.qq.com/t-6386819-1.htm
http://bbs.house.qq.com/t-6386856-1.htm
http://bbs.house.qq.com/t-6386890-1.htm
http://bbs.house.qq.com/t-6386914-1.htm
http://bbs.house.qq.com/t-6386942-1.htm
http://bbs.house.qq.com/t-6386987-1.htm
http://bbs.house.qq.com/t-6387084-1.htm
http://bbs.house.qq.com/t-6387112-1.htm
http://bbs.house.qq.com/t-6387142-1.htm
http://bbs.house.qq.com/t-6387173-1.htm
http://bbs.house.qq.com/t-6387209-1.htm
http://bbs.house.qq.com/t-6387241-1.htm
http://bbs.house.qq.com/t-6387274-1.htm
http://bbs.house.qq.com/t-6387290-1.htm
http://bbs.house.qq.com/t-6387303-1.htm
http://bbs.house.qq.com/t-6387349-1.htm
http://bbs.house.qq.com/t-6387388-1.htm
http://bbs.house.qq.com/t-6387415-1.htm
http://bbs.house.qq.com/t-6387443-1.htm
http://bbs.house.qq.com/t-6387509-1.htm
http://bbs.house.qq.com/t-6387534-1.htm
http://bbs.house.qq.com/t-6387560-1.htm
http://bbs.house.qq.com/t-6387620-1.htm
http://bbs.house.qq.com/t-6387644-1.htm
http://bbs.house.qq.com/t-6387678-1.htm
http://bbs.house.qq.com/t-6387708-1.htm
http://bbs.house.qq.com/t-6387735-1.htm
http://bbs.house.qq.com/t-6387763-1.htm
http://bbs.house.qq.com/t-6387784-1.htm
http://bbs.house.qq.com/t-6387823-1.htm
http://bbs.house.qq.com/t-6387855-1.htm
http://bbs.house.qq.com/t-6387886-1.htm
http://bbs.house.qq.com/t-6387931-1.htm
http://bbs.house.qq.com/t-6387959-1.htm
http://bbs.house.qq.com/t-6387988-1.htm
http://bbs.house.qq.com/t-6388027-1.htm
http://bbs.house.qq.com/t-6388057-1.htm
http://bbs.house.qq.com/t-6388087-1.htm
http://bbs.house.qq.com/t-6388099-1.htm
http://bbs.house.qq.com/t-6388119-1.htm
http://bbs.house.qq.com/t-6388153-1.htm
http://bbs.house.qq.com/t-6388177-1.htm
http://bbs.house.qq.com/t-6388200-1.htm
http://bbs.house.qq.com/t-6388229-1.htm
http://bbs.house.qq.com/t-6388283-1.htm
http://bbs.house.qq.com/t-6388311-1.htm
http://bbs.house.qq.com/t-6388362-1.htm
http://bbs.house.qq.com/t-6388417-1.htm
http://bbs.house.qq.com/t-6388442-1.htm
http://bbs.house.qq.com/t-6388505-1.htm
http://bbs.house.qq.com/t-6388589-1.htm
http://bbs.house.qq.com/t-6388720-1.htm
http://bbs.house.qq.com/t-6388789-1.htm
http://bbs.house.qq.com/t-6388812-1.htm
http://bbs.house.qq.com/t-6388858-1.htm
http://bbs.house.qq.com/t-6388903-1.htm
http://bbs.house.qq.com/t-6388940-1.htm
http://bbs.house.qq.com/t-6389004-1.htm
http://bbs.house.qq.com/t-6389116-1.htm
http://bbs.house.qq.com/t-6389321-1.htm
http://bbs.house.qq.com/t-6389359-1.htm
http://bbs.house.qq.com/t-6389407-1.htm
http://bbs.house.qq.com/t-6389518-1.htm
http://bbs.house.qq.com/t-6389565-1.htm
http://bbs.house.qq.com/t-6389628-1.htm
http://bbs.house.qq.com/t-6389693-1.htm
http://bbs.house.qq.com/t-6389824-1.htm
http://bbs.house.qq.com/t-6389912-1.htm
http://bbs.house.qq.com/t-6389965-1.htm
http://bbs.house.qq.com/t-6390184-1.htm
http://bbs.house.qq.com/t-6390245-1.htm
http://bbs.house.qq.com/t-6390282-1.htm
http://bbs.house.qq.com/t-6390344-1.htm
http://bbs.house.qq.com/t-6390408-1.htm
http://bbs.house.qq.com/t-6390468-1.htm
http://bbs.house.qq.com/t-6390547-1.htm
http://bbs.house.qq.com/t-6390618-1.htm
http://bbs.house.qq.com/t-6390667-1.htm
http://bbs.house.qq.com/t-6390728-1.htm
http://bbs.house.qq.com/t-6390792-1.htm
http://bbs.house.qq.com/t-6390854-1.htm
http://bbs.house.qq.com/t-6390917-1.htm
http://bbs.house.qq.com/t-6390963-1.htm
http://bbs.house.qq.com/t-6391005-1.htm
http://bbs.house.qq.com/t-6391122-1.htm
http://bbs.house.qq.com/t-6391142-1.htm
http://bbs.house.qq.com/t-6391197-1.htm
http://bbs.house.qq.com/t-6391242-1.htm
http://bbs.house.qq.com/t-6391323-1.htm
http://bbs.house.qq.com/t-6391387-1.htm
http://bbs.house.qq.com/t-6391502-1.htm
http://bbs.house.qq.com/t-6391529-1.htm
http://bbs.house.qq.com/t-6391552-1.htm
http://bbs.house.qq.com/t-6391572-1.htm
http://bbs.house.qq.com/t-6391588-1.htm
http://bbs.house.qq.com/t-6391611-1.htm
http://bbs.house.qq.com/t-6391624-1.htm
http://bbs.house.qq.com/t-6391664-1.htm
http://bbs.house.qq.com/t-6391721-1.htm
http://bbs.house.qq.com/t-6391743-1.htm
http://bbs.house.qq.com/t-6391760-1.htm
http://bbs.house.qq.com/t-6391800-1.htm
http://bbs.house.qq.com/t-6391819-1.htm
http://bbs.house.qq.com/t-6391848-1.htm
http://bbs.house.qq.com/t-6391880-1.htm
http://bbs.house.qq.com/t-6391901-1.htm
http://bbs.house.qq.com/t-6391917-1.htm
http://bbs.house.qq.com/t-6391959-1.htm
http://bbs.house.qq.com/t-6392002-1.htm
http://bbs.house.qq.com/t-6392055-1.htm
http://bbs.house.qq.com/t-6392097-1.htm
http://bbs.house.qq.com/t-6392165-1.htm
http://bbs.house.qq.com/t-6392244-1.htm
http://bbs.house.qq.com/t-6392299-1.htm
http://bbs.house.qq.com/t-6392336-1.htm
http://bbs.house.qq.com/t-6392367-1.htm
http://bbs.house.qq.com/t-6392413-1.htm
http://bbs.house.qq.com/t-6392461-1.htm
http://bbs.house.qq.com/t-6392703-1.htm
http://bbs.house.qq.com/t-6392753-1.htm
http://bbs.house.qq.com/t-6392803-1.htm
http://bbs.house.qq.com/t-6392820-1.htm
http://bbs.house.qq.com/t-6392836-1.htm
http://bbs.house.qq.com/t-6392871-1.htm
http://bbs.house.qq.com/t-6392889-1.htm
http://bbs.house.qq.com/t-6392907-1.htm
http://bbs.house.qq.com/t-6392935-1.htm
http://bbs.house.qq.com/t-6392950-1.htm
http://bbs.house.qq.com/t-6392977-1.htm
http://bbs.house.qq.com/t-6393001-1.htm
http://bbs.house.qq.com/t-6393024-1.htm
http://bbs.house.qq.com/t-6393072-1.htm
http://bbs.house.qq.com/t-6393127-1.htm
http://bbs.house.qq.com/t-6393152-1.htm
http://bbs.house.qq.com/t-6393206-1.htm
http://bbs.house.qq.com/t-6393257-1.htm
http://bbs.house.qq.com/t-6393374-1.htm
http://bbs.house.qq.com/t-6393388-1.htm
http://bbs.house.qq.com/t-6393405-1.htm
http://bbs.house.qq.com/t-6393428-1.htm
http://bbs.house.qq.com/t-6393452-1.htm
http://bbs.house.qq.com/t-6393468-1.htm
http://bbs.house.qq.com/t-6393493-1.htm
http://bbs.house.qq.com/t-6393522-1.htm
http://bbs.house.qq.com/t-6393543-1.htm
http://bbs.house.qq.com/t-6393561-1.htm
http://bbs.house.qq.com/t-6393576-1.htm
http://bbs.house.qq.com/t-6393624-1.htm
http://bbs.house.qq.com/t-6393652-1.htm
http://bbs.house.qq.com/t-6393672-1.htm
http://bbs.house.qq.com/t-6393694-1.htm




Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

How do I use the HTML5 <time> element to represent dates and times semantically? How do I use the HTML5 <time> element to represent dates and times semantically? Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 &lt;time&gt; element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles