index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <style scoped>
  2. .actor {
  3. &.typing:after {
  4. content: '|';
  5. animation: blink 500ms infinite;
  6. }
  7. }
  8. .banner {
  9. position: relative;
  10. height: 420px;
  11. color: #fff;
  12. margin-bottom: 130px;
  13. .container {
  14. position: relative;
  15. }
  16. img {
  17. position: absolute;
  18. top: 15px;
  19. right: -10px;
  20. }
  21. }
  22. .banner-sky {
  23. position: absolute;
  24. top: -150px;
  25. bottom: -15px;
  26. width: 100%;
  27. margin-top: -140px;
  28. transform: skewY(-5deg);
  29. transform-origin: center;
  30. background-image: linear-gradient(180deg, #0d1a44 13%, #3c4f91 56%, #5fc1e4 100%);
  31. }
  32. img.banner-stars {
  33. top: -10px;
  34. left: 50%;
  35. transform: translateX(-50%);
  36. }
  37. .banner-desc {
  38. padding-top: 80px;
  39. font-size: 46px;
  40. position: relative;
  41. z-index: 10;
  42. h2 {
  43. font-size: 46px;
  44. margin: 0;
  45. }
  46. p {
  47. font-size: 14px;
  48. opacity: .8;
  49. width: 420px;
  50. line-height: 1.8;
  51. }
  52. }
  53. .cards {
  54. margin: 0 auto 110px;
  55. width: 1140px;
  56. .container {
  57. @utils-clearfix;
  58. padding: 0;
  59. margin: 0 -11px;
  60. width: auto;
  61. }
  62. li {
  63. width: 33.33333%;
  64. padding: 0 19px;
  65. box-sizing: border-box;
  66. float: left;
  67. list-style: none;
  68. }
  69. }
  70. .card {
  71. height: 430px;
  72. width: 100%;
  73. background:#ffffff;
  74. border:1px solid #eaeefb;
  75. border-radius:5px;
  76. box-sizing: border-box;
  77. text-align: center;
  78. position: relative;
  79. transition: all .3s ease-in-out;
  80. bottom: 0;
  81. img {
  82. margin: 66px auto 60px;
  83. }
  84. h3 {
  85. margin: 0;
  86. font-size: 18px;
  87. color: #1f2f3d;
  88. font-weight: normal;
  89. }
  90. p {
  91. font-size: 14px;
  92. color: #99a9bf;
  93. padding: 0 25px;
  94. line-height: 1.8;
  95. }
  96. a {
  97. height: 53px;
  98. line-height: 52px;
  99. font-size: 14px;
  100. color: #20a0ff;
  101. text-align: center;
  102. border: 0;
  103. border-top: 1px solid #eaeefb;
  104. padding: 0;
  105. cursor: pointer;
  106. width: 100%;
  107. position: absolute;
  108. bottom: 0;
  109. left: 0;
  110. background-color: #fff;
  111. border-radius: 0 0 5px 5px;
  112. transition: all .3s;
  113. text-decoration: none;
  114. display: block;
  115. &:hover {
  116. background-color: #20a0ff;
  117. color: #fff;
  118. background: #20a0ff;
  119. }
  120. }
  121. &:hover {
  122. bottom: 6px;
  123. box-shadow: 0px 6px 18px 0px rgba(232,237,250,0.50);
  124. }
  125. }
  126. @keyframes blink {
  127. from { opacity: 0; }
  128. to { opacity: 1; }
  129. }
  130. @media (max-width: 1140px) {
  131. .cards {
  132. width: 100%;
  133. }
  134. }
  135. </style>
  136. <template>
  137. <div>
  138. <div class="banner">
  139. <div class="banner-sky"></div>
  140. <img class="banner-stars" src="~examples/assets/images/stars.png" alt="Element">
  141. <div class="container">
  142. <div class="banner-desc">
  143. <h2>网站快速成型工具</h2>
  144. <div id="line1" class="actor"></div>
  145. <div id="line2" class="actor"></div>
  146. <p>Element,一套为开发者、设计师和产品经理准备的基于 Vue 2.0 的组件库,提供了配套设计资源,帮助你的网站快速成型。</p>
  147. </div>
  148. <img src="~examples/assets/images/banner-bg.svg" alt="Element">
  149. </div>
  150. </div>
  151. <div class="cards">
  152. <ul class="container">
  153. <li>
  154. <div class="card">
  155. <img src="~examples/assets/images/zhinan.png" alt="">
  156. <h3>指南</h3>
  157. <p>了解设计指南,帮助产品设计人员搭建逻辑清晰、结构合理且高效易用的产品。</p>
  158. <router-link
  159. active-class="active"
  160. to="/guide/design"
  161. exact>查看详情
  162. </router-link>
  163. </div>
  164. </li>
  165. <li>
  166. <div class="card">
  167. <img src="~examples/assets/images/zujian.png" alt="">
  168. <h3>组件</h3>
  169. <p>使用组件 Demo 快速体验交互细节;使用前端框架封装的代码帮助工程师快速开发。</p>
  170. <router-link
  171. active-class="active"
  172. to="/component/layout"
  173. exact>查看详情
  174. </router-link>
  175. </div>
  176. </li>
  177. <li>
  178. <div class="card">
  179. <img src="~examples/assets/images/ziyuan.svg" alt="">
  180. <h3>资源</h3>
  181. <p>下载相关资源,用其快速搭建页面原型或高保真视觉稿,提升产品设计效率。</p>
  182. <router-link
  183. active-class="active"
  184. to="/resource"
  185. exact>查看详情
  186. </router-link>
  187. </div>
  188. </li>
  189. </ul>
  190. </div>
  191. </div>
  192. </template>
  193. <script>
  194. import theaterJS from 'theaterjs';
  195. export default {
  196. mounted() {
  197. function typing(theater) {
  198. theater
  199. .addScene('产品设计师', 600, -5, 800)
  200. .addScene('交互设计师', 600, -5, 500)
  201. .addScene('视觉设计师', 600, -5, 700)
  202. .addScene('产品经理', 600, -4, 600)
  203. .addScene('前端工程师', 600, -5, 800)
  204. .addScene((done) => {
  205. typing(theater);
  206. done();
  207. });
  208. }
  209. var theater = theaterJS();
  210. theater
  211. .on('type:start, erase:start', function() {
  212. theater.getCurrentActor().$element.classList.add('typing');
  213. })
  214. .on('type:end, erase:end', function() {
  215. theater.getCurrentActor().$element.classList.remove('typing');
  216. });
  217. theater
  218. .addActor('line1', { speed: 0.8, accuracy: 0.6 })
  219. .addActor('line2')
  220. .addScene(400)
  221. .addScene('line1:快速搭建页面', 600)
  222. .addScene('line2:只为守护世界和平', 800, -6, '让你少加班', 1000)
  223. .addScene('line2:只为这样的你: ', 600)
  224. .addScene((done) => {
  225. typing(theater);
  226. done();
  227. });
  228. }
  229. };
  230. </script>