<template>
<view>
<view>
用纯css实现三角形
<view class="box"></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.box{
//设置宽高为0
width: 0px;
height: 0px;
//设置border
border: 100rpx solid;
//设置边框上下左右颜色,需要的保留颜色,其他设置透明
border-top-color: #aaaaff;
border-right-color: #ff5500;
border-bottom-color: transparent;
border-left-color: transparent;
}
</style>
用纯css实现三角形
最新推荐文章于 2023-08-21 14:47:29 发布