gpt4 book ai didi

html - 使用 Bootstrap 创建一个两列 100% 的布局

转载 作者:太空狗 更新时间:2023-10-29 13:16:02 25 4
gpt4 key购买 nike

所以我正在尝试使用 Twitter Bootstrap 和 Ryan Fait 的粘性页脚创建布局

<body>
<div class="wrapper">
<div class="header">
</div>
<div class="user-panel">
<h1>Side Panel</h1>
</div>

<div class="content">
Hello World!
</div>

<div class="push"></div>
</div>
<div class="footer">
</div>
</body>

我似乎无法将用户面板和内容扩展到 100% 高度,尝试了这些但它们不起作用:

http://www.sitepoint.com/forums/showthread.php?868712-100-height-sidebar-background

http://fiddle.jshell.net/teresko/UG8Rk/show/ 我需要圆形边框,所以...

这是 CSS...

/* Header */.header {    height: 40px;    margin-top: 0px;    border: 1px solid #999;    -webkit-border-radius: 0px 0px 5px 5px;    -moz-border-radius: 0px 0px 5px 5px;    border-radius: 0px 0px 5px 5px;    -webkit-box-shadow: #666 0px 1px 1px;    -moz-box-shadow: #666 0px 1px 1px;    box-shadow: #666 0px 1px 1px;    background: #F3F3F1;    background: -webkit-gradient(linear, 0 0, 0 bottom, from(#F3F3F1), to(#2B2B2B) );    background: -webkit-linear-gradient(#F3F3F1, #2B2B2B);    background: -moz-linear-gradient(#F3F3F1, #2B2B2B);    background: -ms-linear-gradient(#F3F3F1, #2B2B2B);    background: -o-linear-gradient(#F3F3F1, #2B2B2B);    background: linear-gradient(#F3F3F1, #2B2B2B);    -pie-background: linear-gradient(#F3F3F1, #2B2B2B);    behavior: url(/PIE.htc);}/* End of Header *//* Footer */.footer {    margin-top: 12px;    background-color: #000;    margin-bottom: 0px;    margin-right: 20px;    margin-left: 20px;    clear: both;    height: 40px;    border: 1px solid #999;    -webkit-border-radius: 5px 5px 0px 0px;    -moz-border-radius: 5px 5px 0px 0px;    border-radius: 5px 5px 0px 0px;    -webkit-box-shadow: #666 0px 1px 1px;    -moz-box-shadow: #666 0px 1px 1px;    box-shadow: #666 0px 1px 1px;    background: #F3F3F1;    background: -webkit-gradient(linear, 0 0, 0 bottom, from(#F3F3F1), to(#2B2B2B) );    background: -webkit-linear-gradient(#F3F3F1, #2B2B2B);    background: -moz-linear-gradient(#F3F3F1, #2B2B2B);    background: -ms-linear-gradient(#F3F3F1, #2B2B2B);    background: -o-linear-gradient(#F3F3F1, #2B2B2B);    background: linear-gradient(#F3F3F1, #2B2B2B);    -pie-background: linear-gradient(#F3F3F1, #2B2B2B);    behavior: url(/PIE.htc);}/* End of Footer *//* Sticky footer by Ryan Fait... with a little customization*/* {    margin: 0;}html,body {    height: 100%;}.wrapper {    padding-left: 20px;    padding-right: 20px;    min-height: 100%;    height: auto !important;    height: 100%;    margin: 0 auto -4em;}.push {    height: 40px;    clear: both;}/* End of Sticky footer*//* User Panel ( that sidepanel on the left side with navigation etc) */.user-panel {    border: 1px solid #999;    -webkit-border-radius: 5px 5px 5px 5px;    -moz-border-radius: 5px 5px 5px 5px;    border-radius: 5px 5px 5px 5px;    -webkit-box-shadow: #666 0px 1px 1px;    -moz-box-shadow: #666 0px 1px 1px;    box-shadow: #666 0px 1px 1px;    background: #F3F3F1;    background: -webkit-gradient(linear, 0 0, 0 bottom, from(#F3F3F1), to(#2B2B2B) );    background: -webkit-linear-gradient(#F3F3F1, #2B2B2B);    background: -moz-linear-gradient(#F3F3F1, #2B2B2B);    background: -ms-linear-gradient(#F3F3F1, #2B2B2B);    background: -o-linear-gradient(#F3F3F1, #2B2B2B);    background: linear-gradient(#F3F3F1, #2B2B2B);    -pie-background: linear-gradient(#F3F3F1, #2B2B2B);    behavior: url(/PIE.htc);    width: 175px;    float: left;    height: inherit;    background: gray;}/* End of User Panel */

感谢任何帮助...谢谢...

编辑:

感谢 Andrea Ligios 提供的 fiddle !

http://jsfiddle.net/RPFcN/2/

适用于 Firefox,但不适用于 Chrome...

最佳答案

嗨你好早上好凯文!将此代码放在您的侧面板元素中

display: block;
position:absolute;
height:auto;
bottom:0;
top:0;

希望这有帮助:)

关于html - 使用 Bootstrap 创建一个两列 100% 的布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13136846/

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