尝试将
div
的宽度设置为 100%
并将 vertical-align
与 justify-content
切换,如下所示:
.ui.toggle.checkbox {
display: inline-flex;
align-items: baseline;
justify-content: center;
width:100%;
}
.ui.toggle.checkbox label {
margin-left: 0.5em;
}
<div class="ui toggle checkbox">
<input type="checkbox" name="stromlos" id="stromlos">
<label>Stromlos</label>
</div>