Commit d3e348c75033362d8f910ad46176e5b7588f9209

Authored by 潘钊
1 parent 6a80863b

up

src/main/resources/static/login.html
... ... @@ -33,30 +33,52 @@ Login page
33 33 }
34 34  
35 35 .loginCenter {
36   - background-image: url(./assets/img/login_bgcenter.png);
37   - background-repeat: no-repeat;
38   - background-size: 100%;
39   - position: absolute;
  36 + background-image: url(./assets/img/login_bgcenter.png);
  37 + background-repeat: no-repeat;
  38 + background-size: 100%;
  39 +
  40 + width: 768px;
  41 + height: 283.2px;
  42 + margin: auto;
  43 + position: absolute;
  44 + top: 0;
  45 + left: 0;
  46 + bottom: 0;
  47 + right: 0;
  48 +
40 49 }
41 50  
42 51 .loginInputDiv {
43 52 top: 48%;
44   - width: 80%;
  53 +/* width: 80%;
45 54 position: absolute;
46 55 vertical-align: middle;
47   - text-align: center;
  56 + text-align: center; */
48 57 }
49 58  
50 59 .loginInput {
51   - padding: 6px 12px;
52   - border: 1px solid #ffffff;
53   - background-color: #FFFFFF;
54   - vertical-align: middle;
  60 + height: 32px;
  61 + padding: 6px 12px;
  62 + background-color: #fff;
  63 + border: 1px solid #c2cad8;
  64 + border-radius: 2px !important;
  65 + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  66 + box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  67 + -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
  68 + -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
  69 + transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
55 70 }
56 71  
57 72 .buttonLogin {
58 73 cursor: pointer;
59 74 }
  75 +
  76 +.login-form{
  77 + position: relative;
  78 + width: 100%;
  79 + height: 100%;
  80 + text-align: center;
  81 +}
60 82 </style>
61 83 </head>
62 84  
... ... @@ -84,7 +106,7 @@ Login page
84 106  
85 107 <script type="text/javascript">
86 108 $(function() {
87   - setCenterCss();
  109 + /* setCenterCss(); */
88 110 if ($.url().param('error')) {
89 111 //去session里查一下失败信息
90 112 $.get('/user/loginFailure', function(msg) {
... ... @@ -93,9 +115,9 @@ Login page
93 115 location.href = '/login.html';
94 116 });
95 117 }
96   - $(window).resize(setCenterCss);
  118 + /* $(window).resize(setCenterCss); */
97 119 // 设置登录界面样式,让登陆框始终居中
98   - function setCenterCss() {
  120 + /* function setCenterCss() {
99 121 $(".loginCenter").css({
100 122 width : $(window).width() * 0.4,
101 123 height : $(window).height() * 0.2,
... ... @@ -104,17 +126,17 @@ Login page
104 126 left : ($(window).width() - $(".loginCenter") .outerWidth()) / 2,
105 127 top : ($(window).height() - $(".loginCenter") .outerHeight()) / 2
106 128 });
107   - }
  129 + } */
108 130 // 设置两个输入框的高度和左边图片高度一致,宽度为父DIV loginInputDiv减 去三个按钮的宽带度/2*0。8
109   - $(".loginInput").css({
  131 + /* $(".loginInput").css({
110 132 height : $("#img_user").height(),
111 133 width : ($(".loginInputDiv").width()- $("#img_user").width() * 2 -
112 134 $(".buttonLogin").width()) / 2 * 0.8
113   - });
  135 + }); */
114 136 // 设置中间登陆框DIV左右居中
115   - $(".loginInputDiv").css({
  137 + /* $(".loginInputDiv").css({
116 138 left : ($(".loginCenter").outerWidth() - $(".loginInputDiv").outerWidth()) / 2,
117   - });
  139 + }); */
118 140 $(".buttonLogin").bind("click", function() {
119 141 $(".login-form").submit();
120 142 });
... ...