【问题标题】:Having problems with background image using CSS使用 CSS 处理背景图像时遇到问题
【发布时间】:2017-05-13 19:06:27
【问题描述】:

我在尝试向我的网站添加背景图片时遇到问题, 背景显示在 Firefox 中,但我必须重新加载页面 2 次才能看到它:/ 在 Chrome 上,它根本不显示:/

这是我的代码:

html {
    /*-------------------------- Fond De Pages --------------------------*/
    --blue-back: fixed url("/medias/images/blue_back.jpg");
    --christmas-back: fixed url("/medias/images/christmas_back.jpg");
    --mlg-back:  fixed url("/medias/images/mlg.png");
    /*-------------------------------------------------------------------*/
    background: var(--christmas-back); /* Changer le fond ICI */
    text-decoration: none;
    color: inherit;
    font-family: 'Roboto', sans-serif;
    display:inline-block;
}

body {
    text-decoration: none;
    color: inherit;
    margin: 0;
    padding: 0;
}

【问题讨论】:

标签: css image google-chrome firefox background


【解决方案1】:

我发现了问题:在某些版本的chrome中,不支持CSS变量!

我必须直接输入背景图片的网址,不,它工作正常!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-28
    • 2011-01-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多