【问题标题】:How to change position of buttons to required location inside window?如何将按钮的位置更改为窗口内所需的位置?
【发布时间】:2018-04-14 14:52:02
【问题描述】:

我对窗口的样式有一点疑问,我希望屏幕上的这两个按钮出现在窗口的右下角。我需要给这个标签什么样式才能使按钮出现在底部。 我附上了一张需要如何改变位置的图片:css样式疑问

我们将不胜感激。提前致谢。

【问题讨论】:

标签: html css jqxwidgets


【解决方案1】:

这样尝试,你可以达到你想要的。

.wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  background: #ccc;
}
.buttons {
  position: absolute;
  bottom: 0;
  right: 0
}
<div class="wrapper">
 <div class="buttons">
   <button>submit</button>
    <button>reset</button>
 </div>  
</div>

【讨论】:

    【解决方案2】:
    <button style="position:absolute; bottom:0; right: -290px;">submit</button>
    
    <button style="position:absolute; bottom:0; right: -215px;">cancel</button>
    

    这似乎解决了我关于定位按钮的问题。谢谢大家的投入

    【讨论】:

      【解决方案3】:

      将两个按钮放在一个 div 中并设置 div id="something"。然后定义#something的css。

      #something{
         position:fixed;
         bottom:0;
         right:0;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-07-17
        • 1970-01-01
        • 2023-01-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-04-09
        相关资源
        最近更新 更多