zoukankan      html  css  js  c++  java
  • 圆形进度条css3样式

              <view class="con">
                        <view class="percent-circle percent-circle-left">
                            <view class="left-content"></view>
                        </view>
                        <view class="percent-circle percent-circle-right">
                            <view style="transform: rotate(30deg);" class="right-content"></view>
                        </view>
                        <view class="text-circle">30%</view>
                    </view>
    以下样式100upx是50upx的2倍,这是尺寸比例
    .con
    { position: relative; display: inline-block; height: 100upx; width: 100upx; } .percent-circle { position: absolute; height: 100%; background: #46A4DA;//走过的进度条颜色 overflow: hidden; } .percent-circle-right { right: 0; width: 50upx; border-radius: 0 50upx 50upx 0/0 50upx 50upx 0; } .right-content { position: absolute; content: ''; width: 100%; height: 100%; transform-origin: left center; transform: rotate(0deg); border-radius: 0 50upx 50upx 0/0 50upx 50upx 0; background: #ccc;//进度条底色 } .percent-circle-left { width: 50upx; border-radius: 50upx 0 0 50upx/50upx 0 0 50upx; } .left-content { position: absolute; content: ''; width: 100%; height: 100%; transform-origin: right center; transform: rotate(0deg); border-radius: 50upx 0 0 50upx/50upx 0 0 50upx; background: #ccc;//进度条底色 } .text-circle { position: absolute; display: flex; align-items: center; justify-content: center; height: 80%; width: 80%; left: 10%; top: 10%; border-radius: 100%; background-color: #f2f2f2;//百分比数字的底色 }
  • 相关阅读:
    函数是什么?
    设置mac笔记本为固定ip
    JMeter-充值-生成随机数
    JMeter_方案上架,遇到的问题及解决
    做有态度的测试做
    JMeter-标的上架调整与完成
    上标-担保机构
    JMeter已传值但是提示为空
    JMeter上架标的(yyb-csg)
    JMeter中的正则表达式的匹配
  • 原文地址:https://www.cnblogs.com/shark1100913/p/10002295.html
Copyright © 2011-2022 走看看