Heim  >  Artikel  >  Web-Frontend  >  求css基础问题!_html/css_WEB-ITnose

求css基础问题!_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:12:34851Durchsuche

怎样在css中将背景图片填满真个页面,并且在滑动的时候使得图片不动,只有内容动的啊?谢谢!


回复讨论(解决方案)

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

缩写方式:

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

 background-attachment:fixed;

谢谢!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn