App.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <script>
  2. export default {
  3. onLaunch: function () {
  4. console.warn(
  5. "当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!"
  6. );
  7. console.log("App Launch");
  8. },
  9. onShow: function () {
  10. console.log("App Show");
  11. },
  12. onHide: function () {
  13. console.log("App Hide");
  14. },
  15. };
  16. </script>
  17. <style lang="scss">
  18. @import "uview-ui/index.scss";
  19. @import "color-ui/main.css";
  20. /*每个页面公共css */
  21. @import "@/uni_modules/uni-scss/index.scss";
  22. /* #ifndef APP-NVUE */
  23. @import "@/static/customicons.css";
  24. // 设置整个项目的背景色
  25. page {
  26. background-color: #f5f5f5;
  27. }
  28. .rec {
  29. box-sizing: border-box;
  30. position: relative;
  31. overflow: hidden;
  32. /* margin: 300px auto; */
  33. /* width: 300px; */
  34. /* height: 4px; */
  35. /* border: 0.1px solid #ccc; */
  36. }
  37. .rec::before {
  38. position: absolute;
  39. bottom: 0;
  40. content: "";
  41. height: 2px;
  42. width: 158px;
  43. background-color: red;
  44. /* 依次对应:动画名、时长、匀速、无限循环 */
  45. animation: move 3s;
  46. }
  47. @keyframes move {
  48. from {
  49. left: -100%;
  50. }
  51. to {
  52. left: 100%;
  53. }
  54. }
  55. /* #endif */
  56. .example-info {
  57. font-size: 14px;
  58. color: #333;
  59. padding: 10px;
  60. }
  61. </style>