css - 背景图像在 Chrome 上使用 Bootstrap 在右侧重复

标签 css google-chrome twitter-bootstrap-3

我是 bootstrap 的新手,已经在几个浏览器上测试了我的网页。

当我在 chrome 上从左侧或右侧缩小选项卡的宽度时,部分图像被裁剪并放在图像的另一侧。 imgur 图片显示了问题。

如有任何帮助或建议,我们将不胜感激!

This is the issue of bootstrap with chrome

My website page with a problem is here

我把我的CSS代码放在下面:

#header {
    width: 100%;
    min-height: 500px;
    /*height: 50%;*/
    background-image: url("/galleryPhotos/whiteVan2.jpeg");
    margin-top: 0px;
    background-size: cover;
    background-position: 100%;
    background-repeat: no-repeat;
    top: 0px;
    position: relative;
}

最佳答案

尝试将这些添加到您的 css,在您的示例中它似乎对我有用。

-webkit-background-size: cover; //safari chrome
-moz-background-size: cover; // firefox
-o-background-size: cover; // opera

这是一个 fiddle (尽管图片不同):https://jsfiddle.net/46zcm0yL/

关于css - 背景图像在 Chrome 上使用 Bootstrap 在右侧重复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34597541/

相关文章:

javascript - 尝试将 Chrome Javascript 扩展移植到 Safari

css - 引导菜单 : col-md computed hight is 1px despite div not empty

html - 导航栏下拉列表项在动画之前显示为左对齐

java - 如何在使用 itext 从 HTML 创建 pdf 时自定义字体样式

google-chrome - Chrome 不会提出额外的视频文件请求

javascript - HTML 5 的 <picture> 延迟加载(没有 jquery)

javascript - 我的 javascript 在 chrome 中不工作

javascript - DIV 覆盖/覆盖其他元素

javascript - 如何在 div 上的鼠标周围插入 href - wordpress 不断删除 ahref

html - z-index 不工作,图像在 div 后面