我有两个字形,我希望彼此相邻,但它们之间有一些空间,我似乎无法摆脱它。
以下是它的外观:
这是我的代码:
var temp = new DerivedEntity1 {
BaseEntProp1 = "should be ignored",
BaseEntProp2 = "this also should be ignored"};
string tempJson = JsonConvert.SerializeObject(temp);
的CSS:
<div class="form-group" id="authForm">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
<label id="authLabel" for="trash" style="visibility: hidden;">Trash</label>
</div> <!-- end form-group -->
<div class="form-group" id="authForm">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
<label id="authLabel" for="trash" style="visibility: hidden;">Trash</label>
</div> <!-- end form-group -->
答案 0 :(得分:1)
从#authForm
减少或删除宽度。
.glyphicon {
font-size: 25px;
vertical-align: middle;
}
#authForm {
display:inline-block;
width:30px;
}
&#13;
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="form-group" id="authForm">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
<label id="authLabel" for="trash" style="visibility: hidden;">Trash</label>
</div> <!-- end form-group -->
<div class="form-group" id="authForm">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
<label id="authLabel" for="trash" style="visibility: hidden;">Trash</label>
</div> <!-- end form-group -->
&#13;
答案 1 :(得分:1)
简单地使用span,form-group是html表单元素所必需的。
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>