如何使图像作为网页的背景,而不考虑显示此网页的屏幕大小?我想要正确地显示它。多么?
发布于 2012-06-03 19:01:42
通过jQuery插件;)
发布于 2012-07-15 01:26:10
使用这个css非常简单(用你的背景图片替换image.jpg )
body{height:100%;
width:100%;
background-image:url(image.jpg);/*your background image*/
background-repeat:no-repeat;/*we want to have one single image not a repeated one*/
background-size:cover;/*this sets the image to fullscreen covering the whole screen*/
/*css hack for ie*/
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.image.jpg',sizingMethod='scale');
-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.jpg',sizingMethod='scale')";
}发布于 2013-09-02 10:36:46
嗯,为什么不干脆把图片放在最下面的一层,然后放弃所有的烦恼呢?
<img src='yourmom.png' style='position:fixed;top:0px;left:0px;width:100%;height:100%;z-index:-1;'>https://stackoverflow.com/questions/10869739
复制相似问题