In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to achieve the circular progress bar under the short video by php". In the daily operation, I believe that many people have doubts about how to achieve the circular progress bar under the short video by php. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to achieve the circular progress bar under the short video by php". Next, please follow the editor to study!
/ 1. Encapsulated in utils / / bottom round bar function floorCir (obj= {}) {/ / Parameter is obj object let id=obj.id?obj.id:null; let x = obj.x?obj.x:null; let y = obj.y?obj.y:null; let radius = obj.radius?obj.radius:null; var cxt_arc = wx.createCanvasContext (id); / / find id--- pay attention to id do not repeat cxt_arc.setLineWidth (6) Cxt_arc.setStrokeStyle ('# ECECEC'); cxt_arc.setLineCap ('round'); cxt_arc.beginPath (); cxt_arc.arc (x, y, radius, 0,2 * Math.PI, false); cxt_arc.stroke (); cxt_arc.draw ();} / * * Circular progress bar package * / function drawCircle (obj= {}) {let evl = obj.evl?obj.evl:null; let id = obj.id?obj.id:null Let x = obj.x?obj.x:null; let yearly obj.ylet ctx; let radius=obj.radius?obj.radius:null; var crore=evl; / / dynamically generated scores draw a circle let ctx = wx.createCanvasContext (id,this) / / must add this if (varName) {clearInterval (varName); varName = null;} function drawArc (s, e) {/ / console.log (s) Ctx.setFillStyle ('white'); ctx.clearRect (0,0,120,120); ctx.draw (); / / var x = 60, y = 60, radius = 50; / * * set gradient * / var gradient = ctx.createLinearGradient (200,100,100,200); gradient.addColorStop ("0", "# 7CF8BA"); gradient.addColorStop ("0.7", "# 35B3FF") Gradient.addColorStop ("1. 0", "# 7CF8BA"); ctx.setLineWidth (6); / Progress bar width ctx.setStrokeStyle (gradient); ctx.setLineCap ('round'); ctx.beginPath (); ctx.arc (x, y, radius, s, e, false); ctx.stroke () ctx.draw ()} var step = 1, startAngle = 1.5 * Math.PI, endAngle = 0 Var animation_interval = 60, n = crore; var animation = function () {if (step)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.