Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.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
Twitter bootstrap 带引导的全高柱_Twitter Bootstrap_Reactjs_Reactstrap - Fatal编程技术网

Twitter bootstrap 带引导的全高柱

Twitter bootstrap 带引导的全高柱,twitter-bootstrap,reactjs,reactstrap,Twitter Bootstrap,Reactjs,Reactstrap,我正在使用react和reactstrap创建一些模板。这就是我的代码现在的样子: import React, { Component } from 'react'; import { Container, Row, Col } from 'reactstrap'; const styles = { container: { }, right: { height: window.innerHeight, // I want to change this paddi

我正在使用react和reactstrap创建一些模板。这就是我的代码现在的样子:

import React, { Component } from 'react';
import { Container, Row, Col } from 'reactstrap';

const styles = {
  container: {

  },
  right: {
    height: window.innerHeight, // I want to change this
    padding: 0,
    margin: 0,
    overflow: 'hidden',
    backgroundColor: 'yellow'
  },
  left: {
    overflowY: '100%',
    padding: 0,
    height: window.innerHeight,
    paddingBottom: '50px',
    backgroundColor: 'white'
  },
  row: {
    marginBottom: 0
  }
}

class MainArea extends Component {
  constructor(){
   super();
  }
  render() {
   return (
     <Container fluid>
      <Row>
       <Col xs="12" sm="4" md="4" lg="3" style={ styles.left }>
           Some text
       </Col>
       <Col xs="12" sm="8" md="8" lg="9" style={ styles.right }>
           Some text
       </Col>
      </Row>
     </Container>
   );
 }
}

export default MainArea;
我不喜欢在CSS中使用JS,但我不知道如何在reactstrap库中这样做


有什么想法吗?

也许您可以使用css视口单元“vh”:

height: 100vh

但请检查浏览器支持,它们可能无法在较旧的iOS设备上工作:

我很好奇在CSS中不使用JS的选择,因为旧浏览器不支持VH。到目前为止情况如何?
height: 100vh