search
HomeWeb Front-endHTML TutorialHow to use CSS to design a large background image website_html/css_WEB-ITnose

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
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
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Mar 04, 2025 pm 12:32 PM

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

How to efficiently add stroke effects to PNG images on web pages?How to efficiently add stroke effects to PNG images on web pages?Mar 04, 2025 pm 02:39 PM

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

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 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 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 <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

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 <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> 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 <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

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 <time> 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

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 agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),