index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <style scoped>
  2. .banner {
  3. height: 420px;
  4. background-color: #20a0ff;
  5. color: #fff;
  6. margin-bottom: 130px;
  7. .container {
  8. position: relative;
  9. }
  10. img {
  11. position: absolute;
  12. top: 15px;
  13. right: -105px;
  14. }
  15. }
  16. .banner-desc {
  17. padding-top: 80px;
  18. font-size: 46px;
  19. position: relative;
  20. z-index: 10;
  21. h2 {
  22. font-size: 80px;
  23. margin: 0;
  24. }
  25. }
  26. .cards {
  27. margin: 0 auto 110px;
  28. width: 960px;
  29. .container {
  30. @utils-clearfix;
  31. padding: 0;
  32. margin: 0 -11px;
  33. width: auto;
  34. }
  35. li {
  36. width: 33.33333%;
  37. padding: 0 11px;
  38. box-sizing: border-box;
  39. float: left;
  40. list-style: none;
  41. }
  42. }
  43. .card {
  44. height: 430px;
  45. width: 100%;
  46. background:#ffffff;
  47. border:1px solid #eaeefb;
  48. border-radius:5px;
  49. box-sizing: border-box;
  50. text-align: center;
  51. position: relative;
  52. transition: bottom .3s;
  53. bottom: 0;
  54. img {
  55. margin: 66px auto 60px;
  56. }
  57. h3 {
  58. margin: 0;
  59. font-size: 18px;
  60. color: #1f2f3d;
  61. font-weight: normal;
  62. }
  63. p {
  64. font-size: 14px;
  65. color: #99a9bf;
  66. padding: 0 25px;
  67. }
  68. a {
  69. height: 53px;
  70. line-height: 52px;
  71. font-size: 14px;
  72. color: #20a0ff;
  73. text-align: center;
  74. border: 0;
  75. border-top: 1px solid #eaeefb;
  76. padding: 0;
  77. cursor: pointer;
  78. width: 100%;
  79. position: absolute;
  80. bottom: 0;
  81. left: 0;
  82. background-color: #fff;
  83. border-radius: 0 0 5px 5px;
  84. transition: all .3s;
  85. text-decoration: none;
  86. display: block;
  87. &:hover {
  88. background-color: #20a0ff;
  89. color: #fff;
  90. background: #20a0ff;
  91. }
  92. }
  93. &:hover {
  94. bottom: 6px;
  95. box-shadow: 0px 6px 18px 0px rgba(232,237,250,0.50);
  96. }
  97. }
  98. </style>
  99. <template>
  100. <div>
  101. <div class="banner">
  102. <div class="container">
  103. <div class="banner-desc">
  104. <h2>Element</h2>
  105. <div id="source" style="display: none;" ref="type-source">
  106. 快速搭建页面<br/>只为这样的你: <span data-type="back" ref="type-job">设计师</span>
  107. </div>
  108. <div id="output-wrap">
  109. <span id="output" ref="type-output"></span>
  110. <span class="typing-cursor typing-cursor-white">|</span>
  111. </div>
  112. </div>
  113. <img src="~examples/assets/images/banner-bg.svg" alt="Element">
  114. </div>
  115. </div>
  116. <div class="cards">
  117. <ul class="container">
  118. <li>
  119. <div class="card">
  120. <img src="~examples/assets/images/zujian.svg" alt="">
  121. <h3>指南</h3>
  122. <p>了解设计指南,帮助产品设计人员搭建逻辑清晰、结构合理且高效易用的产品。</p>
  123. <router-link
  124. active-class="active"
  125. to="/guide/design"
  126. exact>查看详情
  127. </router-link>
  128. </div>
  129. </li>
  130. <li>
  131. <div class="card">
  132. <img src="~examples/assets/images/zhinan.svg" alt="">
  133. <h3>组件</h3>
  134. <p>使用组件 Demo 快速体验交互细节;使用前端框架封装的代码帮助工程师快速开发。</p>
  135. <router-link
  136. active-class="active"
  137. to="/component/layout"
  138. exact>查看详情
  139. </router-link>
  140. </div>
  141. </li>
  142. <li>
  143. <div class="card">
  144. <img src="~examples/assets/images/ziyuan.svg" alt="">
  145. <h3>资源</h3>
  146. <p>下载相关资源,用其快速搭建页面原型或高保真视觉稿,提升产品设计效率。</p>
  147. <router-link
  148. active-class="active"
  149. to="/resource"
  150. exact>查看详情
  151. </router-link>
  152. </div>
  153. </li>
  154. </ul>
  155. </div>
  156. </div>
  157. </template>
  158. <script>
  159. import Typing from 'typing.js';
  160. require('typing.js/typing.css');
  161. export default {
  162. mounted() {
  163. var typing = new Typing({
  164. source: this.$refs['type-source'],
  165. output: this.$refs['type-output'],
  166. delay: 80,
  167. done: function() {}
  168. });
  169. typing.start();
  170. }
  171. };
  172. </script>