html图片单张平铺
css:
.bg{
background:url(http://wyz.67ge.com/wp-content/uploads/qzlogo.jpg);
filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";
-moz-background-size:100% 100%;
background-size:100% 100%;
}
//id='bg',background='**.jpg'即可
js:
A=>
<div id="formbackground" style="position:absolute; width:100%; height:100%; z-index:-1">
<img src="pictures/background.jpg" height="100%" width="100%"/>
</div>
B=>
<div id="formbackground" style="position:absolute; z-index:-1;"><img src="10.jpg" height="100%" width="100%"/></div>
<script type="text/javascript">
$(function(){
$('#formbackground').height($(window).height());
$('#formbackground').width($(window).width());
});
</script>
html=>style:background-size:cover;
<style>
body{
font-size:12px;
font-family:"宋体";
background-image:url(../images/ntjh_bg.jpg);
background-repeat:repeat-x;
COLOR: #0C2B30;
}
</style>
这个是横向平铺
background-repeat:repeat-y;
纵向平铺

还不快抢沙发