为什么80%的码农都做不了架构师?>>>
Bootstrap
固定在浏览器(源代码)实现:
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
display: none;
overflow: hidden;
-webkit-overflow-scrolling: touch;
outline: 0;
}
水平居中(源代码)实现:
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
当浏览器视窗大于768px时,模态弹出窗的宽度为600px(源代码)实现:
@media (min-width: 768px) {
.modal-dialog {
width: 600px;
margin: 30px auto;
}
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
}
.modal-sm {
width: 300px;
}
}