PNG只显示在chrome上但不是safari或firefox

时间:2017-06-28 20:20:09

标签: html css google-chrome firefox safari

背景图片和徽标不会在Firefox或Safari上显示,这很奇怪

下面是我的代码我将HTMl和CSS剪切为唯一没有显示“logo”和背景的内容。

CSS

      body {
      background: url("/images/bg1.png") no-repeat fixed;
}

      #logo {
        position: absolute;
        top: 17%;
        left: 15%;
        height: 17%;
        width: auto;
      }

HTML

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<img class="animated shake" id="arrow" src="images/next.png">

<div class="topnav" id="mytopbar">
  <a><button id="donate">Donate</button></a>
  <a>Contact Us</a>
  <a>Whats New</a>
  <a>Shop</a>
</div>

<img id="logo" class="animated bounceInDown" src="/images/Logo.png">

1 个答案:

答案 0 :(得分:0)

请在下面找到更新的代码:

body {
  background: url( "http://www.vlime.co.nz/images/buttons/backgroundimage.jpg") no-repeat fixed;
}

#logo {
  position: absolute;
  top: 17%;
  left: 15%;
  height: 17%;
  width: auto;
}

https://jsfiddle.net/Cozmoz/9mkoqp77/