作者:淡漠少_341 | 来源:互联网 | 2023-09-14 16:09
Iamusingbootstrap3inasmalldiv.WhenIincreasethewindowswidthbydraggingthewindow-t
I am using bootstrap 3 in a small div. When I increase the window's width by dragging the window - the fields (username and password input fields) that are supposed to stay in the interior of the div move out to almost the center of the window. Why? CSS and HTML are below
我在一个小div中使用bootstrap 3。当我通过拖动窗口增加窗口的宽度时 - 应该保留在div内部的字段(用户名和密码输入字段)移动到几乎窗口的中心。为什么? CSS和HTML如下
CSS----
CSS ----
.login {
height: 200px;
width: 330px;
max-width: 330px;
padding: 10px 20px 10px 20px;
background-color: #242424;
border: 1px solid #545454;
border-radius: 5px;
color: #ddd;
}
JS Fiddle
JS小提琴
7 个解决方案