<template>
  <div class="r-img">
    <div class="r-normal" @click="clickHandle">
      <img :src="imgs[0].img" alt>
    </div>
    <div class="rotate">
      <img :src="imgs[1].img" alt>
    </div>
  </div>
</template>

<script>
export default {
  props: ['imgs'],
  methods: {
    clickHandle () {
      this.$emit('clickHandle')
    }
  }
}
</script>

<style scoped>
.r-img {
  position: relative;
}

.r-img div {
  width: 20vw;
  height: 15vw;
  position: absolute;
  top: 0;
  z-index: 99;
  border: 8px #fff solid;
  box-sizing: border-box;
  overflow: hidden;
}

.r-img div img {
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
}
.r-img div:hover img {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.r-img .rotate {
  transform: rotate(17deg);
  z-index: 0;
}

@media screen and (max-width: 1400px) {
  .r-img div {
    top: 18vw;
  }
}
</style>
