我对窗口的样式有一点疑问,我希望屏幕上的这两个按钮出现在窗口的右下角。我需要给这个标签什么样式才能使按钮出现在底部。我附上了一张需要如何改变位置的图片:css样式疑问
帮助将不胜感激。提前致谢。
像这样尝试你可以实现你想要的。
.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>
将两个按钮放在一个 div 中并设置 div id="something"。然后定义#something 的css。
#something{
position:fixed;
bottom:0;
right:0;
}
<button style="position:absolute; bottom:0; right: -290px;">submit</button>
<button style="position:absolute; bottom:0; right: -215px;">cancel</button>
这似乎解决了我关于定位按钮的问题。谢谢大家的投入