-1

嗨,我在网上找到了一个教程,可以满足我的表格上下滑动。

唯一的问题是它位于左侧。我想把它放在右边。

这是演示的链接

这是教程中的代码

.feedback {
  position: fixed;
  left: 0;
  bottom: 0;
}

.feedback a {
   display: block;
   height: 20px;
   width: 100px;
   text-align: center;
   background: red;
   border: 2px solid #fff;
   outline: 1px solid #a1a1a1;
   padding: 5px;
   float: left;
   cursor: pointer;
   color: #FFF;
   font-weight: bold;
   font-size: 18px;
}

我试着改变left:0toright:0float:lefttofloat:right

它实际上适用于 Firefox。但是当我在 chrome 中测试它时,FORM 崩溃并向右移动很远......

帮助和感谢!

4

1 回答 1

2

只需更改left:0forright:0就可以了。我已经使用您在 chrome 中提供的示例对其进行了测试。生成的类样式是:

.feedback {
    position: absolute;
    right: 0;
    bottom: 0;
}

更新

我注意到以前的解决方案在隐藏并尝试再次显示表单时失败。要解决它:

.feedback {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 482px;  /*changed*/
}

.feedback a {
    display: block;
    height: 20px;
    width: 100px;
    text-align: center;
    background: #F00;
    border: 2px solid #FFF;
    outline: 1px solid #A1A1A1;
    padding: 5px;
    float: right;   /*changed*/
    cursor: pointer;
    color: #FFF;
    font-weight: bold;
    font-size: 18px;
}
于 2013-09-25T10:08:17.220 回答