效果图:
wxml代码:
<view class="view-contain-ti">
<text class="text-ti">账号</text>
<input class="input1"></input>
</view>
wxss代码:
.view-contain-ti {
display: flex;
height: 40px;
margin: 20px;
border: 3rpx solid #faca82;
border-radius: 10rpx;
}
.text-ti {
position: absolute;
font-size: 12px;
background: white;
margin: -10px 0 0 10px;
padding: 0 5px;
color: rgb(144, 147, 167);
}
.input1 {
margin: auto 10px;
}