<template lang="html">
<div class="wrapper" flex="main:center cross:center">
<div flex="cross:center">
<div class="peng" flex="main:center cross:center">
我是捧哏
</div>
<div class="dou same" flex="main:center cross:center">
我是逗哏
</div>
<div class="peng-dou same" flex="main:center cross:center">
论捧逗
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
computed: {},
created() {},
mounted() {},
methods: {},
watch: {},
components: {}
};
</script>
<style lang="scss" scoped>
.wrapper {
height: 100vh;
.peng {
width: 100px;
height: 40px;
background: red;
color: #fff;
margin-right: 30px;
order: 2;
&:hover + .dou {
background: blue;
width: 500px;
height: 500px;
font-size: 50px;
}
&:hover ~ div {
background: orange;
width: 500px;
height: 500px;
font-size: 50px;
}
}
.same {
border-radius: 20px;
color: #fff;
font-size: 20px;
transition: all 1s;
font-weight: bold;
}
.dou {
width: 100px;
height: 100px;
order: 1;
background: red;
margin-right: 30px;
}
.peng-dou {
width: 200px;
height: 200px;
background: pink;
order: 3;
}
}
</style>
所有后面的兄弟
核心代码:&:hover ~ div { background: orange; width: 500px; height: 500px; font-size: 50px; }
网友评论