logon.wxml
<!--pages/logon/logon.wxml-->
<view style="margin-top:40%">
<form bindsubmit="submit">
<view class="form_item" style="margin-bottom: 20px;">
<i class="iconfont icon-user"></i>
<input type="text" placeholder="用户名" />
</view>
<view class="form_item" style="margin-bottom: 40px;">
<i class="iconfont icon-password"></i>
<input type="password" placeholder="密码" />
</view>
<view>
<button class="login_btn">登录</button>
<button bindtap="enroll">注册</button>
</view>
</form>
</view>
logon.wxss
.form_item {
margin: 0 50rpx;
height: 36px;
border: 1px solid #FFC0CB;
border-radius: 5px;
}
.form_item i {
float: left;
height: 36px;
margin: 0 5px;
font-size: 20px;
color: #FFC0CB;
line-height: 36px;
}
.form_item input {
float: left;
height: 36px;
}
.login_btn {
background: #FFC0CB;
color: white;
margin-bottom: 15px;
}
效果图