css 背景不随模态框内容拉伸
我已经更改了模式登录窗口/弹出窗口的 css 文件。问题是,当我使用登录表单时,底部和右侧有一些滚动条。我想到了拉伸登录对话框,使其更宽、更高的想法。现在的问题是背景不会随着新的尺寸而拉伸。
高度和宽度原来是 100%
#sbox-content
{
clear: both;
overflow: auto;
background-color: #fff;
height: 130%;
width: 160%;
}
这是完整的 css 文件,有人可以解释一下要编辑什么以及在哪里编辑以使背景适合新尺寸吗?也许有更好的解决方案,不必将原来的 100% 尺寸设置为 130% 和 160%
.body-overlayed embed, .body-overlayed object, .body-overlayed select
{
visibility: hidden;
}
#sbox-window embed, #sbox-window object, #sbox-window select
{
visibility: visible;
}
#sbox-overlay
{
position: absolute;
background-color: #FFFFFF;
}
#sbox-window
{
position: absolute;
background-color: #FF7400;
text-align: left;
overflow: visible;
padding: 5px;
-moz-border-radius: 3px;
}
* html #sbox-window
{
top: 50% !important;
left: 50% !important;
}
#sbox-btn-close
{
position: absolute;
width: 30px;
height: 30px;
right: -120px;
top: -15px;
background: url(../images/closebox.png) no-repeat top left;
border: none;
}
.sbox-loading #sbox-content
{
background-image: url(../images/spinner.gif);
background-repeat: no-repeat;
background-position: center;
}
#sbox-content
{
clear: both;
overflow: auto;
background-color: #fff;
height: 130%;
width: 160%;
}
.sbox-content-image#sbox-content
{
overflow: visible;
}
#sbox-image
{
display: block;
}
.sbox-content-image img
{
display: block;
}
.sbox-content-iframe#sbox-content
{
overflow: visible;
}
I have changed a css file for a modal login window/popup. The problem was that when I used the login form, I have some scrollbars at the under and on the right side. I came up with the idea to stretch the login dialog to make it all wider and heigher. The problem now is that the background doesn't stretch with the new dimentions.
The height and the width was originally 100%
#sbox-content
{
clear: both;
overflow: auto;
background-color: #fff;
height: 130%;
width: 160%;
}
This is the complete css file, can somebody explain me what and where to edit to make the background, fit the new dimentions? Maybe there is a better sollution without having to set the original 100% sizes to 130% and 160%
.body-overlayed embed, .body-overlayed object, .body-overlayed select
{
visibility: hidden;
}
#sbox-window embed, #sbox-window object, #sbox-window select
{
visibility: visible;
}
#sbox-overlay
{
position: absolute;
background-color: #FFFFFF;
}
#sbox-window
{
position: absolute;
background-color: #FF7400;
text-align: left;
overflow: visible;
padding: 5px;
-moz-border-radius: 3px;
}
* html #sbox-window
{
top: 50% !important;
left: 50% !important;
}
#sbox-btn-close
{
position: absolute;
width: 30px;
height: 30px;
right: -120px;
top: -15px;
background: url(../images/closebox.png) no-repeat top left;
border: none;
}
.sbox-loading #sbox-content
{
background-image: url(../images/spinner.gif);
background-repeat: no-repeat;
background-position: center;
}
#sbox-content
{
clear: both;
overflow: auto;
background-color: #fff;
height: 130%;
width: 160%;
}
.sbox-content-image#sbox-content
{
overflow: visible;
}
#sbox-image
{
display: block;
}
.sbox-content-image img
{
display: block;
}
.sbox-content-iframe#sbox-content
{
overflow: visible;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定我理解这个问题,但也许您只需要:
您能否通过在线工作测试用例来澄清?
编辑
感谢您的澄清。
似乎你应该在调用它时增加模式窗口的大小:
I'm not sure I understand the question, but perhaps you just need:
Could you clarify with a working test-case online?
EDIT
Thanks for clarifying.
Seems you should increase the size of the modal window when you call it: