back.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <script setup>
  2. import { ref,defineProps } from "vue";
  3. const props = defineProps({
  4. img: {
  5. default:"./image/back.png",
  6. },
  7. content:{
  8. default:"用科学<br />与技术<br />驱动教育变革",
  9. },
  10. content2:{
  11. default:"Education powered by Science & Technology"
  12. }
  13. })
  14. </script>
  15. <template>
  16. <div class="back">
  17. <img :src="props.img" alt="">
  18. <div class="back-content">
  19. <div class="back-content-left">
  20. <div>
  21. <p class="back-content-left-p1" v-html="props.content"></p>
  22. <p class="back-content-left-p2" v-html="props.content2"></p>
  23. </div>
  24. </div>
  25. </div>
  26. </div>
  27. </template>
  28. <style lang="scss">
  29. .back {
  30. width: 100%;
  31. position: relative;
  32. img{
  33. width: 100%;
  34. }
  35. .back-content {
  36. width: 70%;
  37. position: absolute;
  38. top: 50%;
  39. left: 10%;
  40. transform: translate(0, -50%);
  41. h1 {
  42. font-size: 64px;
  43. }
  44. .back-content-left{
  45. padding: 150px;
  46. color: rgba(255, 255, 255, 0.9);
  47. .back-content-left-p1{
  48. display: inline-block;
  49. font-size: 64px;
  50. border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  51. line-height: 88px;
  52. }
  53. .back-content-left-p2{
  54. margin-top: 10px;
  55. color: rgb(255, 255, 255,0.55);
  56. font-size: 20px;
  57. line-height: 28px;
  58. }
  59. }
  60. }
  61. }
  62. </style>