Twitter bootstrap 带引导的全高柱
我正在使用react和reactstrap创建一些模板。这就是我的代码现在的样子: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
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