Implementation ideas
As shown in the figure: Noted properties:
The following code draws a 33% circle <div class="circle-bar"> <div class="circle-bar-left"></div> <div class="circle-bar-right"></div> <div class="mask"> 33% </div> </div> .circle-bar { background-image: linear-gradient(#7affaf, #7a88ff); width: 182px; height: 182px; position: relative; } .circle-bar-left { background-color: #e9ecef; width: 182px; height: 182px; clip: rect(0, 91px, auto, 0); } .circle-bar-right { background-color: #e9ecef; width: 182px; height: 182px; clip: rect(0, auto, auto, 91px); transform: rotate(118.8deg); } .mask { width: 140px; height: 140px; background-color: #fff; text-align: center; line-height: 0.2em; color: rgba(0, 0, 0, 0.5); position: absolute; left: 21px; top: 21px; } .mask > span { display: block; font-size: 44px; line-height: 150px; } /*All descendants are centered horizontally and vertically, so they are concentric circles*/ .circle-bar * { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; } /*Both the element itself and its sub-elements are circles*/ .circle-bar, .circle-bar > * { border-radius: 50%; } This concludes this article about the sample code for implementing a circular gradient progress bar effect with CSS. For more CSS gradient progress bar content, please search 123WORDPRESS.COM’s previous articles or continue browsing the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: A "classic" pitfall of MySQL UPDATE statement
>>: Interpretation and usage of various React state managers
Copy code The code is as follows: .sugLayerDiv{ p...
HTML: Title Heading is defined by tags such as &l...
When nginx receives a request, it will first matc...
Effect There are currently 2 projects (project1, ...
Pull the image docker pull season/fastdfs:1.2 Sta...
Table of contents Essential Difference Database s...
1. Complexity of front-end engineering If we are ...
When encapsulating Vue components, I will still u...
The previous article introduced how to achieve a ...
1. Review Vue responsive usage Vue responsivenes...
When checking the slow query, I found that the ti...
The previous article introduced the implementatio...
Today I will take you through the history of ext4...
View MySQL transaction isolation level mysql> ...
I encountered several browser compatibility issue...