gpt4 book ai didi

css - 全高,流畅的 100% 宽度和高度,2 列 Bootstrap 3 布局,带标题

转载 作者:行者123 更新时间:2023-12-02 08:31:09 25 4
gpt4 key购买 nike

我正在尝试复制我的客户想要的桌面应用程序布局。我需要有关 div 之间的空间和表格的最小高度的帮助。我对自定义 Bootstrap 的经验为零,因此如果我以错误的方式执行此操作,请分享应该如何完成。我试图设置一个 plunker 但我无法让它工作? plunker

 <body  ng-controller="MainCtrl">
<div class="my-container">
<div class="row clearfix">
<div class="col-md-12 column">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<ul class="nav navbar-nav pull-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Master <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li ng-controller="CustomerCtrl"><a ng-click="CustomerModal()">Customer</a></li>

</ul>
</li>
</ul>
<ul class="nav navbar-nav pull-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">New <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li ng-controller="JobCtrl"><a ng-click="clearSelectedJob();NewJobModal()">Job</a></li>

</ul>
</li>
</ul>
</div>
</nav>
</div>
</div>
<div class="row clearfix">
<div class="col-md-2 column well">
<div class="classWithPad">
<div class="my-container well classWithPad">
<table class="table table-condensed">
<span style="background:#595959;display:block;margin-top:-20px;margin-right:-11px;margin-left:-11px;height:95px">ll</span>
<thead> <tr><th style="font-weight: bold;padding-top:30px">No</th><th style="font-weight: bold;">Name</th></tr></thead>
<tbody>
<tr ng-repeat="currentItem in jobArray" class="pointer no_selection" ng-class="{highlight: currentItem.JobNumber===selectedJob.JobNumber}">
<td>{{currentItem.JobNumber}}</td>
<td>{{currentItem.JobName}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-10 column well">
<div class="classWithPad">
<ul class="nav nav-tabs">
<li ng-class="{active: isActive('/')}"><a ng-href="#/">Home</a></li>
<li ng-class="{active: isActive('/changeOrder')}"><a ng-href="#/changeOrder">Change Order</a></li>
<li ng-class="{active: isActive('/purchaseOrder')}"><a ng-href="#/purchaseOrder">Purchase Order</a></li>
</ul>
<div ng-view=""></div>
</div>
</div>

<div class="col-md-12 column">
<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
<div class="my-container">

</div>
</nav>
</div>
</div>
</div>

这是客户想要的 ClientScreenshot

这是我目前所拥有的 CurrentScreenshot

更新

.my-container {
position: absolute;
top: 0;
bottom: 0;
}

Update

最佳答案

Bootstrap 中没有这样的设计模式。我有一些可能有用的东西。

演示:http://jsbin.com/lopej

查看代码:http://jsbin.com/lopej/edit?html,css,js

jQuery:

$(window).on('load resize', function() {

var navbarht = $('.navbar').outerHeight();

function columnHeight() {
// Column heights should equal the document height minus the header height
var newHeight = $(document).height() - (navbarht) -20 + "px";
console.log($(window).height(), (navbarht));
$(".primary-col").css("height", newHeight);
$(".secondary-col").css("height", newHeight);
}

columnHeight();

});

CSS:

html,
body {
background: #777
}
.site-main.row {
margin: 0
}
.header {
background: #C5E0DC
}
.primary-col,.secondary-col {
background-color: #ddd;
padding:10px;
}
.navbar {
margin: 0 0 10px 0
}
.inner {
min-height:100%;
background:#fff;
border:1px solid #ccc;
}

/* needed to override jQuery */
@media (max-width:767px) {
.primary-col,
.secondary-col {
height: auto!important
}
.site-main {
padding-bottom: 0px!important
}
}

/* larger viewport layout */
@media (min-width:768px) {
html,
body {
height: 100%;
width: 100%;
}
#page {
height: 100%;
height: auto !important;
min-height: 100%;
}
.site-main {
height: 100%;
padding:0 10px;
}
.secondary-col {
border-right: 10px solid #777
}
}

HTML:

  <div id="page">
<!-- navbar -->
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project name</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../navbar/">Default</a></li>
<li><a href="../navbar-static-top/">Static top</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
<div class="row site-main">
<div class="col-sm-3 secondary-col">
<div class="inner">secondary</div>
</div>
<!-- /.col-sm-3 -->
<div class="col-sm-9 primary-col">
<div class="inner">primary</div>
</div>
<!-- /.col-sm-9 -->
</div>
<!-- /.row -->
</div>
<!-- /#page-->

关于css - 全高,流畅的 100% 宽度和高度,2 列 Bootstrap 3 布局,带标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26653190/

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