index.vue 868 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="r-img">
  3. <div class="flexable"></div>
  4. <div class="rotate">
  5. <img :src="imgs[1].img" alt>
  6. </div>
  7. <div class="r-normal" @click="clickHandle">
  8. <img :src="imgs[0].img" alt>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. props: ['imgs'],
  15. methods: {
  16. clickHandle () {
  17. this.$emit('clickHandle')
  18. }
  19. }
  20. }
  21. </script>
  22. <style scoped>
  23. .r-img {
  24. position: relative;
  25. padding: 20vw 0;
  26. }
  27. .flexable{
  28. height: 50vw;
  29. width: 100%;
  30. }
  31. .r-img div:not(:first-child) {
  32. width: 70%;
  33. height: 50vw;
  34. margin: 0 auto;
  35. position: absolute;
  36. border: solid #fff 4px;
  37. box-shadow: 0px 0px 10px #999;
  38. left: 50%;
  39. top: 10vw;
  40. transform: translateX(-50%);
  41. }
  42. .r-img div img {
  43. width: 100%;
  44. height: 100%;
  45. }
  46. .r-img .rotate {
  47. transform: translateX(-50%) rotate(17deg)!important;
  48. z-index: 0;
  49. }
  50. </style>