Css背景图像没有出现

时间:2013-10-15 22:28:12

标签: html css background background-image

我正在开设MLA引文的网页。在右上角,我想要一个带齿轮的小盒子来配置设置。

这是css:

#setings{
  display:block;
  height:50px;
  width:50px;
  background:#E1E1E1 url('gear.png') no-repeat fixed center;
  background-size:45px 45px;
  border: 2px solid #AEAEAE;
  border-radius:5px;
  position:absolute;
  top: 5px;
  right: 20px;  
}

这是(非常简单的)html:

<div id="setings"></div>

该框确实出现在我想要的右上角,但齿轮image没有出现。我已经搜索了stackoverflow和其他网站的答案,但到目前为止我还没找到任何东西。

有谁知道我的代码有什么问题?

非常感谢你!

1 个答案:

答案 0 :(得分:1)

从“背景:”行中“修复”。

相关问题