无论宽高比如何,全屏图像

时间:2016-03-31 18:44:23

标签: html css image responsive-design

有没有办法或插件让图像像Fancybox一样填满屏幕。就像自动裁剪,居中和缩放图像一样?

1 个答案:

答案 0 :(得分:1)

body { 
background: url(images/sample.jpg) no-repeat center center fixed; 
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}