Javascript 高度在聊天应用程序中不起作用
我想为元素设置css样式,如元素中所述。所有高度应以百分比表示,因为我想开发响应性应用程序。请调整plunker窗口的大小以了解我想要实现的目标 最大的问题是为容器流体设置100%的高度(参见index.html中的第34行)Javascript 高度在聊天应用程序中不起作用,javascript,html,css,twitter-bootstrap,Javascript,Html,Css,Twitter Bootstrap,我想为元素设置css样式,如元素中所述。所有高度应以百分比表示,因为我想开发响应性应用程序。请调整plunker窗口的大小以了解我想要实现的目标 最大的问题是为容器流体设置100%的高度(参见index.html中的第34行) Plunker链接有整个应用程序如果你有固定高度的页眉和页脚,你可以使用CSS计算,例如: .container-fluid{ height:calc(100vh - 120px); } 如果页眉和页脚的高度均为60像素,则会计算出120像素。请检查下面
Plunker链接有整个应用程序如果你有固定高度的页眉和页脚,你可以使用CSS计算,例如:
.container-fluid{
height:calc(100vh - 120px);
}
如果页眉和页脚的高度均为60像素,则会计算出120像素。请检查下面的代码
.container-fluid {
display: inline-block;
height: calc(100vh - 350px);
width: 100%;
}
.container-fluid .row { height: 100%; }
.container-fluid .row .col-md-9 {
height: 100%;
}
.container-fluid .row .col-md-9 textarea.form-control {
height: 100%;
}
请去读。
.container-fluid {
display: inline-block;
height: calc(100vh - 350px);
width: 100%;
}
.container-fluid .row { height: 100%; }
.container-fluid .row .col-md-9 {
height: 100%;
}
.container-fluid .row .col-md-9 textarea.form-control {
height: 100%;
}