草庐IT

html - IE11 不会背景大小 : cover

我有一个div#service_wrap它有一个图像应该覆盖页面的100%宽度它在firefox、chrome和edge中工作正常。但是IE11它将图像居中并且不覆盖div什么是IE相当于背景大小:封面;CSS#service_wrap{padding:0;margin:0;width:100%;height:750px;max-height:750px;display:table;background:url(../images/service_header.jpg)no-repeatcentercenter;-webkit-background-size:cover;-moz-ba

html - 背景大小 :cover, 左边 1px 空白

我的网站上有一个关于background-size:cover的小问题我一直在Firefox中测试它,但是当我在谷歌浏览器中加载页面时,我在左边得到1px的白色。当我使用background-position:-1px时,左边的白边消失了(但后来我把它移到了右边)。有什么办法可以解决这个问题,并且仍然保留封面?我把它应用到我的body上:background:url("images/baggrund.jpg")no-repeatcentercenterfixed;背景大小:覆盖目前我无法链接到该站点,但希望我描述的足够清楚。提前致谢编辑:添加截图,上图来自firefox,下图来自Chr

html - 背景大小 :cover, 左边 1px 空白

我的网站上有一个关于background-size:cover的小问题我一直在Firefox中测试它,但是当我在谷歌浏览器中加载页面时,我在左边得到1px的白色。当我使用background-position:-1px时,左边的白边消失了(但后来我把它移到了右边)。有什么办法可以解决这个问题,并且仍然保留封面?我把它应用到我的body上:background:url("images/baggrund.jpg")no-repeatcentercenterfixed;背景大小:覆盖目前我无法链接到该站点,但希望我描述的足够清楚。提前致谢编辑:添加截图,上图来自firefox,下图来自Chr

html - 替代背景大小 :cover in IE7+

我的网页正文中有一张背景图片。我使用了background-size:cover以便图像在body上拉伸(stretch),同时保持图像的纵横比。我希望IE7+IE8也一样。我环顾四周,看到了以下代码:filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='AutumnWinter_4.jpg',sizingMethod='scale');-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='AutumnWinter_4.jpg',si

html - 替代背景大小 :cover in IE7+

我的网页正文中有一张背景图片。我使用了background-size:cover以便图像在body上拉伸(stretch),同时保持图像的纵横比。我希望IE7+IE8也一样。我环顾四周,看到了以下代码:filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='AutumnWinter_4.jpg',sizingMethod='scale');-ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='AutumnWinter_4.jpg',si

html - "background-size: cover"没有覆盖手机屏幕

我的网站上有一个照片背景,使用background-size:cover。它在大多数情况下都有效,但在纵向模式下在我的GalaxyS3上留下了一个奇怪的~30px空白区域。我附上了截图。1px的蓝绿色线条用于说明整个屏幕。似乎背景在社交媒体ul之后立即停止。我通过删除ul和背景将其附加到标语文本的底部来对此进行测试。另外,这是我关于移动端View的CSS:@mediaonlyscreenand(max-width:480px){.logo{position:relative;background-size:70%;-webkit-background-size:70%;-moz-bac

html - "background-size: cover"没有覆盖手机屏幕

我的网站上有一个照片背景,使用background-size:cover。它在大多数情况下都有效,但在纵向模式下在我的GalaxyS3上留下了一个奇怪的~30px空白区域。我附上了截图。1px的蓝绿色线条用于说明整个屏幕。似乎背景在社交媒体ul之后立即停止。我通过删除ul和背景将其附加到标语文本的底部来对此进行测试。另外,这是我关于移动端View的CSS:@mediaonlyscreenand(max-width:480px){.logo{position:relative;background-size:70%;-webkit-background-size:70%;-moz-bac

html - 防止固定位置背景图像 : cover from resizing in mobile browsers upon address bar hide

很抱歉缺少这方面的示例,但我认为它很容易理解。我的网站有一个固定的背景,目前是这样实现的:#background{position:fixed;top:0;bottom:0;left:0;right:0;background-color:#28305e;background-image:url(../images/background.jpg);background-size:cover;-moz-background-size:cover;background-position:centercenter;z-index:-10;}到目前为止,这在所有浏览器中都很棒,除了移动浏览器,它

html - 防止固定位置背景图像 : cover from resizing in mobile browsers upon address bar hide

很抱歉缺少这方面的示例,但我认为它很容易理解。我的网站有一个固定的背景,目前是这样实现的:#background{position:fixed;top:0;bottom:0;left:0;right:0;background-color:#28305e;background-image:url(../images/background.jpg);background-size:cover;-moz-background-size:cover;background-position:centercenter;z-index:-10;}到目前为止,这在所有浏览器中都很棒,除了移动浏览器,它

html - 背景大小之间的差异 :cover and background-size:contain

在视觉上我可以体会到差异,但在哪些情况下我应该更喜欢其中一种呢?使用它们有什么意义,还是可以用百分比代替?目前,在使用这些属性时,我似乎无法超越试错法,这让我很头疼。我也只能找到非常模糊的解释,尤其是我找到了W3Cdoc非常莫名其妙。Valueshavethefollowingmeanings:‘contain’Scaletheimage,whilepreservingitsintrinsicaspectratio(ifany),tothelargestsizesuchthatbothitswidthanditsheightcanfitinsidethebackgroundpositi