尝试使用grunt的Pageres插件。除了css文件中的背景图像外,还能正常工作:
.parallax-2 {
width:100%;
background: url(../images/bg-banner-1.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}它显示它放大了1000倍。有什么办法解决这个问题吗?
发布于 2016-05-05 23:18:31
您可以定义图像的大小:
带有:大小:'1200x800','800x600',
grunt.initConfig({
pageres: {
screenshot: {
options: {
urls: 'yeoman.io',
sizes: ['1200x800', '800x600'],
dest: 'dist'
}
},
multipleUrls: {
options: {
urls: ['todomvc.com', 'google.com'],
sizes: ['800x1000', '400x1000'],
dest: 'dist',
crop: true
}
}
}
});我希望这对你有帮助
https://stackoverflow.com/questions/37037721
复制相似问题