我正在阅读customization.html#loading-custom-scripts-and-stylesheets,它要求我做以下工作,我已经这样做了:
oc edit configmap/webconsole-config -n openshift-web-console
// I put in the below (obviously with a correct URL):
stylesheetURLs:
- https://url-for-a-css-file
// And also tried it with the below:
stylesheetURLs:[https://url-for-a-css-file]上面的CSS文件如下所示:
#header-logo {
background-image: url("https://url-for-a-png-file") !important;
width: 190px;
height: 20px;
}然而,这两种方法都不起作用。标头标志永远不会改变。
我知道文档上写着“脚本和样式表必须与正确的内容类型一起使用,否则浏览器不会运行它们。脚本必须与内容- type : application/javascript和带有内容的样式表-Type:text/css一起使用。”但如果我只是从HTTPS服务器(在本例中是gitlab URL)链接它,我不确定如何‘为’提供这样的文件。
发布于 2018-11-15 20:26:18
对于外部文件的URL,不能将其放在github / gitlab上。一定要在别的地方托管。
https://stackoverflow.com/questions/53288249
复制相似问题