2017-09-06 45 views
1

我試圖創建固定在頁面頂部的菜單:語義的UI段不覆蓋整個菜單時,菜單固定到頂部

<Segment inverted> 
    <Menu fixed = "top" inverted pointing 
     secondary stackable size="large" > 
    <Container> 
     <Menu.Item as="a" name="Item1"> 
     <Menu.Item as="a" name="Item2"> 
    </Container> 
    </Menu> 
</Segment> 

當菜單固定到頂部周圍段尺寸小於嵌入式菜單(並且不固定到頂部)。

什麼是正確的方法來做到這一點?

Demo on codepen

回答

0

在同一時間你不應該使用secondaryinverted。 如果您刪除secondary屬性,我想您會看到結果。

您也可以添加自定義類的內容Segment所以如果Menu是固定的,加入margin-top: 32px;(你想或任何大小)對內容Segment