看起来很简单,但我似乎想不出来。我有一个带文本的复选框,我需要文本靠左,复选框在右边。我该怎么做呢?
以下是我的代码:
.custom-control-description {
color: #009fff;
text-transform: uppercase;
}
.custom-checkbox .custom-control-indicator {
border-radius: 0;
border: 2px solid #cdc9ca;
background: #fff;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<form>
<div class="checkbox-wrap d-flex justify-content-end p-2 mb-2">
<label class="custom-control custom-checkbox">
<span class="custom-control-description">All Pages</span>
<input type="checkbox" class="custom-control-input">
<span class="custom-control-indicator"></span>
</label>
</div>
</form>
margin-left: 5px
或更多,我不知道它们应该移动多远。@Retros 如果这是您想要的,请接受答案。 - hansTheFranzjustify-content-end
作为类名,这就是为什么它在右上角。请使用justify-content-start
。 - Vipul Singh