CSS 背景图像在 SP 2013 中不工作,但在本地工作

标签 css sharepoint-2013 sharepoint-designer

这在本地有效

body { 
    /*background: Gainsboro;*/
    background: url(../dt_images/bg.jpg) no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

enter image description here

当我在服务器上为 SP 2013 编辑母版页 html 文件时,它没有显示(尽管我所有其他覆盖 CSS 都有效......)。您看不到多云的背景。

body {  
    background: url(../DT_CustomFiles/DT_IMAGES/bg.jpg) no-repeat center center fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

enter image description here

SP 2013 不支持背景图片吗?

谢谢

最佳答案

尝试将图像上传到您的 SharePoint 站点中的站点 Assets ,并编辑 css 中的链接以指向该位置。它应该修复它。

关于CSS 背景图像在 SP 2013 中不工作,但在本地工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21169966/

相关文章:

asp.net - 如何在我的 SharePoint 2013 博客中添加自定义段落样式?

sharepoint - 如何在没有 SharePoint Designer 的情况下在 SharePoint 网站上编辑 default.aspx

html - 没有 css 的输入字段的 css 是什么?

javascript - HTML 文本一直向右扩展

jquery - Dropbox 和菜单

sharepoint-2013 - 使用 SharePoint REST API 将值设置为多值托管元数据字段类型时出错

javascript - 更新一个简单的 jQuery/CSS 代码

iphone - 从手机上传到Angular的图像是横向的或上下颠倒的

javascript - 有没有办法获取 SharePoint 页面上当前页面的标题

sharepoint-2010 - 错误: Unable to display this Web Part