-7

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

在此处输入图像描述

帮助将不胜感激。提前致谢。

4

3 回答 3

0

像这样尝试你可以实现你想要的。

.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>

于 2017-11-02T07:00:18.877 回答
0

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

#something{
   position:fixed;
   bottom:0;
   right:0;
}
于 2017-11-02T07:02:58.217 回答
0
<button style="position:absolute; bottom:0; right: -290px;">submit</button>

<button style="position:absolute; bottom:0; right: -215px;">cancel</button>

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

于 2017-11-02T07:35:48.943 回答