Home  >  Article  >  Web Front-end  >  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

WBOY
WBOYOriginal
2016-06-24 11:53:311101browse

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