选中样式
<template>
<div class="wrapper">
<div>
<p>默认高亮</p>
<p class="custom-highlighting">自定义高亮</p>
</div>
</div>
</template>
<script>
export default {
name: "Table",
components: {},
data() {
return {};
},
methods: {
jsFun() {
console.log(1);
},
},
mounted() {
this.jsFun();
},
};
</script>
<style lang="scss" scoped>
.wrapper {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
p {
font-size: 2rem;
font-family: sans-serif;
}
.custom-highlighting::selection {
background-color: #8e44ad;
color: #fff;
}
</style>