Html 为背景设置图像大小

Html 为背景设置图像大小,html,css,Html,Css,嗨,我正在建设一个网站,我有一个图像,我想作为一个网站的一部分背景图像使用。滚动时,图像会滚动。我只是想调整CSS中的图像大小,以适应屏幕的部分。。。有人能帮我吗?这比看起来更具挑战性 #stat, #newsletter { background: url('../img/worklogo.png') center bottom no-repeat; background-attachment: fixed; -webkit-background-size: cover; -moz-b

嗨,我正在建设一个网站,我有一个图像,我想作为一个网站的一部分背景图像使用。滚动时,图像会滚动。我只是想调整CSS中的图像大小,以适应屏幕的部分。。。有人能帮我吗?这比看起来更具挑战性

#stat, #newsletter 
{
background: url('../img/worklogo.png') center bottom no-repeat; 
background-attachment: fixed; 
-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
background-size: cover;
}

只需删除
背景附件:固定并使用
背景图像:url(“”)
而不是
background:url(“”)
这是你的地址。

请看这篇文章-