右下方反馈按钮

时间:2014-06-09 14:50:36

标签: html css

我尝试设置此图片 -

enter image description here

正确位于底部"反馈"按钮。

我将它放在右下角的位置 -

position: fixed;
right: 0;
top: 92%;

Here its jsFiddle Demo

但是我没有得到欲望显示(我只得到一个没有图像的边框)。

如何解决?

更新

我希望它也显示在右下角。

2 个答案:

答案 0 :(得分:1)

您需要正确定位。

如果你希望它位于右下角,你需要这样做,而不是试图从顶部的一些疯狂抽象中定位。

#feedback_button {
    height: 67px;
    width: 67px;
    position: fixed;
    bottom: 0;
    right: 0;
}

JSFiddle

答案 1 :(得分:1)

当您使用背景图片而没有内部内容时,您必须定义widthheight ..就像这样:

  #feedback_button {
    background: url("http://air-staging-assets.s3.amazonaws.com/assets/feedback_icon.png") 0 0 no-repeat transparent;
    position: fixed;
    right: 0;
    bottom: 0;
    width:67px;
    height:67px;
  }

http://jsfiddle.net/ChubbyNinja/RdrZe/4/

相关问题