gpt4 book ai didi

html - 模态高度和宽度调整

转载 作者:行者123 更新时间:2023-11-28 01:14:12 30 4
gpt4 key购买 nike

尝试调整模态框的高度和宽度,但没有成功。

我试过:

 max-height: 80vh; //

&

@media (min-width: 769px) {
.modal-dialog {
width: 1024px;
margin: 30px auto;

&

  max-height: 100px;
max-width: 100px;

所有人都对模态做了非常“奇怪”的事情。即把它移到屏幕的左边,实际上并没有让它变大。这是我的模态 CSS:

modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
.modal-content {
position: relative;
background-color: #EBEAEA;
border: 1px solid #999;
border: 1px solid transparent;
border-radius: 4px;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
background-clip: padding-box;
outline: 0;
max-height: 100px;
max-width: 100px;
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000;
}
.modal-backdrop.fade {
opacity: 0;
filter: alpha(opacity=0);
}
.modal-backdrop.in {
opacity: 0.5;
filter: alpha(opacity=50);
}
.modal-header {
padding: 20px;
border-bottom: 1px solid transparent;
}
.modal-header .close {
margin-top: -2px;
}
.modal-title {
margin: 0;
line-height: 1.5384616;
}
.modal-body {
position: relative;
padding: 20px;
}
.modal-footer {
padding: 20px;
text-align: right;
border-top: 1px solid transparent;
}

任何指向正确方向的指示都会有所帮助。

jsFiddle:https://jsfiddle.net/tms9vz0k/1/

谢谢!

最佳答案

试试这个 CSS。

@media (min-width: 992px){
.modal-dialog {
width: 1024px !important;
margin: 30px auto;
max-width: 1024px !important;
}
}

关于html - 模态高度和宽度调整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51947846/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com