input.htm 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  6. <title>测测代表你的英伦歌</title>
  7. <script src="/static/ishow/js/jquery-3.2.1.min.js"></script>
  8. <style type="text/css">
  9. *{
  10. margin: 0;
  11. padding: 0;
  12. }
  13. body{
  14. width: 100%;
  15. height: 100%;
  16. }
  17. #bgDiv{
  18. position: absolute;
  19. width: 100%;
  20. text-align: center;
  21. /* height: 100%; */
  22. z-index: -1;
  23. }
  24. #bgDiv img{
  25. margin: 0 auto;
  26. width: 100%;
  27. max-width: 640px;
  28. left: 0;
  29. right: 0;
  30. }
  31. #tblDiv {
  32. position: relative;
  33. width: 100%;
  34. max-width: 416px;
  35. height: 100%;
  36. margin: 0 auto;
  37. /* margin-top: 40%; */
  38. text-align: center;
  39. z-index: 100;
  40. top: 400px;
  41. }
  42. table{
  43. margin: 0 auto;
  44. width: 100%;
  45. border-collapse:separate;
  46. border-spacing:10px;
  47. }
  48. .left{
  49. text-align: right;
  50. width: 30%;
  51. }
  52. .left img{
  53. width: 100%;
  54. max-width: 51px;
  55. }
  56. .right {
  57. text-align: left;
  58. }
  59. .right input{
  60. background: url(/static/ishow/img/img_input.png) no-repeat center center;
  61. background-size: 100% 100%;
  62. border: 0;
  63. padding-left: 8px;
  64. padding-right: 8px;
  65. margin-left: 4px;
  66. max-height: 48px;
  67. height: 90%;
  68. width: 70%;
  69. color: white;
  70. }
  71. #sbBtn{
  72. background: url(/static/ishow/img/btn_cece.png) no-repeat center center;
  73. background-size: 100% 100%;
  74. border: 0;
  75. }
  76. </style>
  77. <script>
  78. $(document).ready(function(){
  79. // css is hard, js is soft
  80. var viewScale = $("#bgImg").width() / 640;
  81. var offset = Math.floor(376 * viewScale);
  82. $('#tblDiv').css({top: offset + 'px'});
  83. var editHeight = Math.floor(48 * viewScale);
  84. $('#nameInput').css({height: editHeight + 'px'});
  85. $('#sexInput').css({height: editHeight + 'px'});
  86. $('#sbBtn').css({
  87. width: Math.floor(206 * viewScale) + 'px',
  88. height: Math.floor(71 * viewScale) + 'px'
  89. });
  90. $('#tblAru').css({
  91. 'border-spacing': Math.floor(10 * viewScale) + 'px'
  92. });
  93. });
  94. window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", function() {
  95. window.location.reload();
  96. }, false);
  97. </script>
  98. </head>
  99. <body>
  100. <div id="bgDiv">
  101. <img id="bgImg" src="/static/ishow/img/inputBg.png">
  102. </div>
  103. <form action="/ishow/design">
  104. <div id="tblDiv">
  105. <table id="tblAru">
  106. <tr>
  107. <td class="left"><img src="/static/ishow/img/txt_name.png"/></td>
  108. <td class="right"><input name="name" id="nameInput" type="text"/> </td>
  109. </tr>
  110. <tr>
  111. </tr>
  112. <tr>
  113. <td class="left"><img src="/static/ishow/img/txt_gender.png"/></td>
  114. <td class="right"><input name="gender" id="sexInput" type="text"/></td>
  115. </tr>
  116. <tr>
  117. </tr>
  118. <tr>
  119. <td colspan="2">
  120. <input id="sbBtn" type="submit" value=""/>
  121. </td>
  122. </tr>
  123. </table>
  124. </div>
  125. </form>
  126. </body>
  127. </html>