css环形进度条clip,圆形进度条的实现纯css

如图

c6d659fe8aeccdc4c3aceca30ee53420.png

代码如下

{{ item.deg + 'deg' }}

export default {

data() {

return {

percentData: [{

number: '123213',

deg: 90,

},

{

number: '123213',

deg: 180,

},

{

number: '123213',

deg: 270,

},

{

number: '123213',

deg: 360,

}

]

}

},

created() {

},

methods: {

},

}

@import "../common/common";

/* 大圆 */

.wrap {

background-color: #ccc;

position: relative;

width: 1.5rem;

height: 1.5rem;

border-radius: 50%;

/* 绘制圆环*/

.circle {

box-sizing: border-box;

border: 1px solid #ccc;

clip: rect(0, 1.5rem, 1.5rem, 0.75rem); //默认不显示左侧的圆弧 小于180deg的时候

position: absolute;

width: 1.5rem;

height: 1.5rem;

border-radius: 50%;

.percent {

box-sizing: border-box;

top: -1px;

left: -1px;

position: absolute;

width: 1.5rem;

height: 1.5rem;

border-radius: 50%;

}

.left {

border: 12px solid #3C8CFF;

clip: rect(0, 0.75rem, 1.5rem, 0);

}

.right {

border: 12px solid #3C8CFF;

clip: rect(0, 1.5rem, 1.5rem, 0.75rem);

}

//该样式控制左侧的圆弧是否显示

.wth0 {

width: 0;

}

}

//该样式控制左侧的圆弧是否显示

.clip-auto {

clip: rect(auto, auto, auto, auto);

}

/* 内圈的小圆*/

.inside-round {

position: absolute;

width: 1.38rem;

height: 1.38rem;

background: #fff;

border-radius: 50%;

top: 0;

left: 0;

right: 0;

bottom: 0;

margin: auto;

text-align: center;

line-height: 1.38rem;

}

}

标签:1.5,clip,进度条,auto,圆形,rem,border,css,deg

来源: https://blog.csdn.net/Candy_mi/article/details/94855308

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值