我正在使用语义 UI。
这是我的 HTML JSFiddle :
<div class="ui items" id="test">
<div class="item">
<div class="content">
<div class="meta">two days ago</div>
<div class="name">hello</div>
<div class="extra">ten pages</div>
<p class="description">I am a pythoner</p>
</div>
</div>
</div>
还有 CSS:
#test{
height:100px;
}
但是CSS好像不行。我无法更改高度。
这些哪里出了问题?
最佳答案
你的 SemanticUI.css 包含一些基础主题,它决定了 .item
类的高度。
.ui.items>.row>.item, .ui.items>.item {
display: block;
float: left;
position: relative;
top: 0;
width: 316px;
min-height: 375px; /* here */
margin: 0 .5em 2.5em;
padding: 0;
background-color: #FFF;
line-height: 1.2;
font-size: 1em;
-webkit-box-shadow: 0 0 0 1px rgba(0,0,0,.1);
box-shadow: 0 0 0 1px rgba(0,0,0,.1);
border-bottom: .2em solid rgba(0,0,0,.2);
border-radius: .33em;
-webkit-transition: -webkit-box-shadow .2s ease;
transition: box-shadow .2s ease;
padding: .5em;
}
您将需要更改或删除该属性。
关于css - 语义用户界面 : how to cut down the Item's height,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23033740/