1.css
- width: 700px;
- height: auto;
- border-radius: 22px;
- margin: auto auto;
- background: rgba(255,255,255,1)url(../images/login_title.png) no-repeat left top /100% 106px;
- padding: 131px 0 25px 0;
- box-sizing: border-box;
- position: absolute;
- left: 0;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
2.js $('body').keydown(function (e) {
console.log(e);if (e.target.offsetParent.className === 'loginContainer') {
if (e.which === 13) {
$scope.register($scope.registerObj);
}
}
});
3.html
<div class="login" ng-controller="registerCtrl">
<div class="loginContainer">
<span ng-show="loginerror != 0" class="yzCodeTip">{{loginerrorInfo | translate}}</span>
<span ng-show="limitAuth" class="yzCodeTip">{{loginerrorInfo | translate}}</span>
<div class="loginTitleWord"></div>
<ul class="loginInner">
<li class="loginPadd">
<input class="login_user" type="text" placeholder="{{'login-user' | translate}}" ng-model="registerObj.username">
</li>
<li class="loginYz">
<input type="text" placeholder="{{'login-verification' | translate}}" ng-model="registerObj.verifyCode" class="login_yzcode" maxLength="4">
<div ng-click="resetCode()" class="getYz {{regObj.isClick?'getCode':''}}">
获取验证码 <span ng-show="regObj.isClick">{{(regObj.time)}}s</span>
</div>
</li>
<li class="loginPadd">
<input class="login_pass" type="password" placeholder="{{'login-psd' | translate}}" ng-model="registerObj.password" minlength="6" maxlength="20">
</li>
<li class="loginPadd">
<input class="login_confirmPwd" type="password" placeholder="{{'login-psd' | translate}}" ng-model="registerObj.confirmPwd" minlength="6" maxlength="20">
</li>
<li class="loginIn"><span ng-click="register(registerObj)">下一步</span>
</li>
<li class="loginIn"><a href="#" ui-sref="login()">已有账号,去登录≶≶</a></li>
</ul>
</div>
</div>