home.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div class="home">
  3. <swiper></swiper>
  4. <div class='home-img-1'>
  5. <img :src='homeImg1' alt="">
  6. <div class="home-nav">
  7. <div class="">品牌</div>
  8. <div class="">管家</div>
  9. <div class="">证件</div>
  10. <div class="">工具</div>
  11. <div class="">赔退</div>
  12. </div>
  13. </div>
  14. <homeList></homeList>
  15. </div>
  16. </template>
  17. <script>
  18. export default {
  19. name: 'home',
  20. data () {
  21. return {
  22. msg: 'Welcome to Your Vue.js App',
  23. homeImg1: 'http://odulvej8l.bkt.clouddn.com/%E5%9B%BE%E6%A0%87-01.jpg'
  24. }
  25. }
  26. }
  27. </script>
  28. <!-- Add "scoped" attribute to limit CSS to this component only -->
  29. <style scoped>
  30. .home-img-1{
  31. background-color: #fff;
  32. margin-top: 3%;
  33. padding: 3% 0;
  34. position: relative;
  35. }
  36. .home-img-1 img{
  37. display: block;
  38. width: 100%;
  39. }
  40. .home-img-1 .home-nav{
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. right: 0;
  45. bottom: 0;
  46. padding: 0 3%;
  47. display: flex;
  48. display: -moz-flex;
  49. display: -webkit-flex;
  50. }
  51. .home-img-1 .home-nav div{
  52. width: 20%;
  53. color: rgba(0,0,0,0.5);
  54. border: 1px solid rgba(0,0,0,0.5);
  55. line-height: 54px;
  56. }
  57. </style>