1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <div class="r-img">
- <div class="flexable"></div>
- <div class="rotate">
- <img :src="imgs[1].img" alt>
- </div>
- <div class="r-normal" @click="clickHandle">
- <img :src="imgs[0].img" alt>
- </div>
- </div>
- </template>
- <script>
- export default {
- props: ['imgs'],
- methods: {
- clickHandle () {
- this.$emit('clickHandle')
- }
- }
- }
- </script>
- <style scoped>
- .r-img {
- position: relative;
- padding: 20vw 0;
- }
- .flexable{
- height: 50vw;
- width: 100%;
- }
- .r-img div:not(:first-child) {
- width: 70%;
- height: 50vw;
- margin: 0 auto;
- position: absolute;
- border: solid #fff 4px;
- box-shadow: 0px 0px 10px #999;
- left: 50%;
- top: 10vw;
- transform: translateX(-50%);
- }
- .r-img div img {
- width: 100%;
- height: 100%;
- }
- .r-img .rotate {
- transform: translateX(-50%) rotate(17deg)!important;
- z-index: 0;
- }
- </style>
|