2
我正在嘗試使用語義Ui組件做出反應的Web應用程序。不過,我真的很努力地讓主要內容組件佔據屏幕的全尺寸(見圖片)。我希望主要內容組件填滿剩餘空間,但它似乎只佔用盡可能多的空間。最後,我希望能夠有側邊欄粘,只有滾動的主要內容使用語義UI邊欄製作全尺寸的主要內容邊欄反應組件
render() {
const { visible } = this.state
return (
<div>
<Button onClick={this.toggleVisibility}>Toggle Visibility</Button>
<Sidebar.Pushable as={Segment}>
<Sidebar as={Menu} animation='push' width='thin' visible={visible} icon='labeled' vertical inverted>
<Menu.Item name='home'>
<Icon name='home' />
Home
</Menu.Item>
<Menu.Item name='gamepad'>
<Icon name='gamepad' />
Games
</Menu.Item>
<Menu.Item name='camera'>
<Icon name='camera' />
Channels
</Menu.Item>
</Sidebar>
<Sidebar.Pusher>
<Segment basic>
<Header as='h3'>Application Content</Header>
<Image src='/assets/images/wireframe/paragraph.png' />
</Segment>
</Sidebar.Pusher>
</Sidebar.Pushable>
</div>
)
}
我試過的風格直列{height:100%}
適用於一切從上行層次結構中的根組件,但似乎沒有任何使其填充頁面的其餘部分。我知道這看起來像一個簡單的問題,但我被卡住了哈哈。有任何想法嗎?