我使用的是语义用户界面,无法正确设置网格。根据文档,Semantic UI使用16列,我试图在左侧放置宽度为three
的列,并在其旁边放置宽度为thirteen
的列。这是它的外观(图片被裁剪):
我已经使用Bootstrap很长时间了,现在尝试使用Semantic UI。我错过了什么? Demo
<header>
<div class="mobile hidden">
<div class="ui container">
<div class="ui grid">
<div class="eight column">
<div class="ui secondary menu">
<a class="active item">
Home
</a>
<a class="item">
Messages
</a>
<a class="item">
Friends
</a>
<div class="right menu">
<div class="item">
<div class="ui icon input">
<input type="text" placeholder="Search...">
<i class="search link icon"></i>
</div>
</div>
<a class="ui item">
Logout
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<div class="clearing"></div>
<div class="ui container">
<div class="mobile hidden">
<div class="ui grid row">
<aside class="three column red">
</aside>
<section class="thirteen column olive">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab doloremque illum quas? Dolore dolorem dolorum ipsum? Commodi error excepturi laboriosam magnam nobis odio suscipit unde! Alias atque dicta reiciendis sapiente!
</section>
</div>
</div>
</div>
答案 0 :(得分:2)
您在wide
元素中缺少另外两个类field
和HTML
。改变如下
<aside class="three wide field column red"></aside>
<section class="thirteen wide field column olive">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab doloremque illum quas? Dolore dolorem dolorum ipsum? Commodi error excepturi laboriosam magnam nobis odio suscipit unde! Alias atque dicta reiciendis sapiente!
</section>