Java文件下载,HTML进度条实时刷新进度

阅读: 评论:0

2024年1月25日发(作者:)

Java文件下载,HTML进度条实时刷新进度

.circliful { position: relative;

}.circle-text, .circle-info, .circle-text-half, .circle-info-half { width: 100%; position: absolute; text-align: center; display: inline-block;}.circle-info, .circle-info-half { color: #999;}.circliful .fa { margin: -10px 3px 0 3px; position: relative; bottom: 4px;}JS (function( $ ) { $.ful = function(options) { var settings = $.extend({ // These are the defaults. foregroundColor: "#556b2f", backgroundColor: "#eee", fillColor: false, width: 15, dimension: 200, size: 15,

percent: 50, animationStep: 1.0 }, options ); return (function() { var dimension = ''; var text = ''; var info = ''; var width = ''; var size = 0; var percent = 0; var endPercent = 100; var fgcolor = ''; var bgcolor = ''; var icon = ''; var animationstep = 0.0; $(this).addClass('circliful'); if($(this).data('dimension') != undefined) { dimension = $(this).data('dimension'); } else { dimension = ion; } if($(this).data('width') != undefined) { width = $(this).data('width'); } else { width = ;

width = ; } if($(this).data('fontsize') != undefined) { size = $(this).data('fontsize'); } else { size = ; } if($(this).data('percent') != undefined) { percent = $(this).data('percent') / 100; endPercent = $(this).data('percent'); } else { percent = t / 100; } if($(this).data('fgcolor') != undefined) { fgcolor = $(this).data('fgcolor'); } else { fgcolor = oundColor; } if($(this).data('bgcolor') != undefined) { bgcolor = $(this).data('bgcolor'); } else { bgcolor = oundColor; } if($(this).data('animation-step') != undefined) { animationstep = parseFloat($(this).data('animation-step')); } else { animationstep = ionStep; } if($(this).data('text') != undefined) { text = $(this).data('text'); if($(this).data('icon') != undefined) { icon = ''; } if($(this).data('type') != undefined) { type = $(this).data('type'); if(type == 'half') { $(this).append('' + icon + text + ''); $(this).find('.circle-text-half').css({'line-height': (dimension / 1.45) + 'px', 'font-size' : size + 'px' }); } else { $(this).append('' + icon + text + ''); $(this).find('.circle-text').css({'line-height': dimension + 'px', 'font-size' : size + 'px' }); } } else { $(this).append('' + icon + text + ''); $(this).find('.circle-text').css({'line-height': dimension + 'px', 'font-size' : size + 'px' }); } } else if($(this).data('icon') != undefined) { } if($(this).data('info') != undefined) { info = $(this).data('info'); if($(this).data('type') != undefined) { type = $(this).data('type'); if(type == 'half') {

$(this).append('' + info + '');

$(this).append('' + info + ''); $(this).find('.circle-info-half').css({'line-height': (dimension * 0.9) + 'px', }); } else { $(this).append('' + info + ''); $(this).find('.circle-info').css({'line-height': (dimension * 1.25) + 'px', }); } } else { $(this).append('' + info + ''); $(this).find('.circle-info').css({'line-height': (dimension * 1.25) + 'px', }); } } $(this).width(dimension + 'px'); var canvas = $('').attr({ width: dimension, height: dimension }).appendTo($(this)).get(0); var context = text('2d'); var x = / 2; var y = / 2; var degrees = percent * 360.0; var radians = degrees * ( / 180); var radius = / 2.5; var startAngle = 2.3 * ; var endAngle = 0; var counterClockwise = false; var curPerc = animationstep === 0.0 ? endPercent : 0.0; var curStep = (animationstep, 0.0); var circ = * 2; var quart = / 2; var type = ''; var fill = false; if($(this).data('type') != undefined) { type = $(this).data('type'); if(type == 'half') { var startAngle = 2.0 * ; var endAngle = 3.13; var circ = * 1.0; var quart = / 0.996; } } if($(this).data('fill') != undefined) { fill = $(this).data('fill'); } else { fill = lor; } //animate foreground circle function animate(current) { ect(0, 0, , ); ath(); (x, y, radius, endAngle, startAngle, false); dth = width - 1; // line color Style = bgcolor; (); if(fill) { yle = fill; (); } ath(); (x, y, radius, -(quart), ((circ) * current) - quart, false);

(x, y, radius, -(quart), ((circ) * current) - quart, false); dth = width; // line color Style = fgcolor; (); if (curPerc < endPercent) { curPerc += curStep; requestAnimationFrame(function () { animate((curPerc, endPercent) / 100); }); } } animate(curPerc / 100); }); };}( jQuery ));

Java文件下载,HTML进度条实时刷新进度

本文发布于:2024-01-25 19:14:36,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/1706181276112.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:进度条   文件   下载
留言与评论(共有 0 条评论)
   
验证码:
排行榜

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23