Home > Web Front-end > HTML Tutorial > Asking for basic css questions! _html/css_WEB-ITnose

Asking for basic css questions! _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:12:34
Original
878 people have browsed it

How to fill the entire page with a background image in CSS, so that the image does not move when sliding, and only the content moves? Thank you!


Reply to discussion (solution)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><style type="text/css">body {	background-image:url(http://avatar.profile.csdn.net/E/C/F/2_t5500.jpg);	background-repeat: repeat;	background-attachment:fixed;}</style><div style="height:10000px;">TEST</div></body></html>
Copy after login

Abbreviation:

body {	background:url(http://avatar.profile.csdn.net/E/C/F/2_t5500.jpg) repeat fixed;}
Copy after login

background-attachment:fixed;

Thank you!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template