//设为盒子模型 主轴上子元素排列布局space-between
.newAdd_wrap>.add_left, .acif_left, .part_left {
display: flex;
justify-content: space-between;
}
//设为盒子模型后 也可以给定宽度
.add_left, .acif_left, .part_left {
width: 87% !important;
}
//里面的子元素可为自己设置一定长度
.newAdd_wrap>.add_left input, .part_left input, .acif_left input, .part_left>.small_title_keyword input {
display: inline-block;
width: 230px;
height: 26px;
padding-left: 4px;
}
<div class="timeWrap">
<span class="textStyle lf">创建时间:</span> <div class="playBlock mleft"> <input type="text" id="createTime"> </div></div>
//自适应 父级
.duiqi>.timeWrap {
- float: left;
- width: 50%;
}
.textStyle {
- width: 85px;
- text-align: right;
}
.textStyle {
- width: 85px;
- text-align: right;
}
.lf {
- float: left;
}
.duiqi .playBlock {
- display: block;
}
.mleft {
- margin-left: 85px;
}