<template>
<div class="parallelogram"> 平行四边形</div>
</template>
<style lang="less">
.parallelogram {
margin: 100px;
width: 200px;
height: 50px;
line-height: 50px;
text-align: center;
clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
background-image: linear-gradient(to right, red, yellow);
}
</style>
用css写平行四边形
于 2023-04-14 12:54:36 首次发布