Html CSS-背景尺寸:封面太大

Html CSS-背景尺寸:封面太大,html,css,uiimageview,presentation,Html,Css,Uiimageview,Presentation,当我尝试使用带有固定位置的“背景大小:封面”属性时,我的图像会变得太大并被裁剪。我希望它和原始图像一样大,但我想不出来。我正在努力保持图像的效果 #wrapper { width:100%; height:580px; background-image:url('http://www.myorderdesk.com/Providers/206190/Files/31/full_width_image_1.jpg'); background-position: center cent

当我尝试使用带有固定位置的“背景大小:封面”属性时,我的图像会变得太大并被裁剪。我希望它和原始图像一样大,但我想不出来。我正在努力保持图像的效果

#wrapper {
  width:100%;
  height:580px;
   background-image:url('http://www.myorderdesk.com/Providers/206190/Files/31/full_width_image_1.jpg');
background-position: center center;
background-attachment:fixed;
background-repeat: no-repeat;
background-size: 100% 100%; 
/*background-size:cover;*/
-webkit-transition: background-image 0.4s;
-moz-transition: background-image 0.4s;
-ms-transition: background-image 0.4s;
-o-transition: background-image 0.4s;
transition: background-image 0.4s;
overflow: hidden;
-webkit-font-smoothing: subpixel-antialiased;
}
这是我的


全屏

试试这个封面:

#wrapper {
background-size:contain;
}

也许封面不是答案。。W3schools:“将背景图像缩放到尽可能大的位置,以便背景区域完全被背景图像覆盖。背景图像的某些部分可能在背景定位中看不到。这是您想要的吗?也许覆盖不是答案。W3schools:”缩放背景图像,使其尽可能大,以便背景区域完全被背景图像覆盖。背景图像的某些部分可能在背景定位区域内看不到“我认为背景大小是相对于窗口而不是其元素的。您可能会认为它只是覆盖到容器上,但事实并非如此。这会造成“裁剪”的影响“@Harry遗憾的是,在你的演示版Harry中,它仍然适合我。试着让它与我的演示中它下面的图像大小相同。这是100%宽度的原始图像大小。