我有两个菜单,一个固定在底部,另一个固定在顶部。我的问题有两个方面。一是我希望它们出现在屏幕的中央,并且只占据其内容的宽度(而不是像默认情况下一样流动)。
我在文档中没有找到任何表明这是可能的,因此解决方案可能就是使用CSS进行修改?
非常感谢任何帮助。
我在文档中没有找到任何表明这是可能的,因此解决方案可能就是使用CSS进行修改?
非常感谢任何帮助。
<div class="ui centered grid">
<div class="center aligned column">
<div class="ui compact menu">
<a class="active item">
<i class="home icon"></i> Home
</a>
<a class="item">
<i class="mail icon"></i> Messages
</a>
</div>
</div>
</div>
JSFiddle链接:http://jsfiddle.net/pLskpufp/2/
<div class="ui center aligned container">
<div class="ui compact menu">
<a class="active item">
<i class="home icon"></i> Home
</a>
<a class="item">
<i class="mail icon"></i> Messages
</a>
</div>
</div>
JSFiddle Link: http://jsfiddle.net/377v6ect/1/
fixed
类时,似乎会出现故障。 - rubie<div className="fixed bottom">
<div className="ui centered grid">
<div className="center aligned column">
<!-- Your Semantic UI menu here, but not fixed. -->
</div>
</div>
</div>
div.fixed {
width: 100%;
position: fixed;
}
div.fixed.bottom {
bottom: 0;
}
div.fixed.top {
top: 0;
}
我在语义论坛和其他地方进行了搜索;创建了我的... 希望对你也有用。
<div class="ui center aligned container">
<div class="ui" style="background-color: #009999;">
<!-- <a href="https://semantic-ui.com/examples/fixed.html#" class="header item"> -->
<div class="ui centered small image" >
<a href="#">
<img class="logo" src="./logo_white.png">
</a>
</div>
<!-- </a> -->
</div>
</div>