怎样设置网页的背景为图片?
body{background:url(/img)}
背景图片不平铺?
body{background:url(/img)no-repeat;}
背景图片不被拉伸变形?
body{background:url(/img) no-repeat;} background-size:
background-size:cover;//使背景图片足够大,填满整个背景区域。可能出现图片部分不显示。
background-size:contain; //使图片完全显示,可能出现背景未填满。
background-size:50% 50% /100px 100px //如果只填写一个,另一个auto;