Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 高度在聊天应用程序中不起作用_Javascript_Html_Css_Twitter Bootstrap - Fatal编程技术网

Javascript 高度在聊天应用程序中不起作用

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像素。请检查下面

我想为元素设置css样式,如元素中所述。所有高度应以百分比表示,因为我想开发响应性应用程序。请调整plunker窗口的大小以了解我想要实现的目标

最大的问题是为容器流体设置100%的高度(参见index.html中的第34行)



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%;
}