1 Star 0 Fork 0

品质码男/countUp.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 6.72 KB
一键复制 编辑 原始数据 按行查看 历史
Jamie Perkins 提交于 2020-08-25 06:49 . fix rapid update issue
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="robots" content="index,follow">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="A javascript class that animates a numerical value by counting to it.">
<title>CountUp.js</title>
<link rel="stylesheet" type="text/css" href="https://inorganik.github.io/assets/css/style.css?v=20191111">
<!-- <script src="demo/demo.js" type="module"></script> -->
<script src="dist/countUp.umd.js"></script>
<script src="demo/demo-nomodule.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-7742845-9', 'inorganik.github.io');
ga('send', 'pageview');
</script>
</head>
<body>
<a class="forkMe" href="https://github.com/inorganik/CountUp.js"><img src="https://inorganik.github.io/assets/img/forkme_custom_indigo.png" alt="Fork me on GitHub"></a>
<div id="wrap">
<header>
<div id="github"><a class="block" href="https://inorganik.github.io"></a></div>
<div class="leaderLine">////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
<div id="logo"><a class="block" href="https://inorganik.net"></a></div>
</header>
<section>
<h1>CountUp.js &nbsp;<small id="version" class="lt-gray"></small></h1>
<p>CountUp.js is a dependency-free, lightweight JavaScript class that can be used to quickly create animations that display numerical data in a more interesting way.</p>
<p>Install via npm/yarn using the package name &nbsp;<code class="indigo large">countup.js</code>.</p>
<p>🆕&ensp; <a href="https://podmap.org">Check out Podmap</a> &mdash; Mapping the world&rsquo;s podcasts.</p>
<h3 class="marginTop marginBottom"><a class="lime weight700" href="https://github.com/inorganik/CountUp.js">Download on Github</a></h3>
</section>
<section>
<p style="position:absolute; top:5px; left:0;">Current stars:</p>
<h1 class="jumbo" id="myTargetElement">0</h1>
</section>
<section id="errorSection" style="background-color:#FFDCDC; display:none" class="col-inner">
<h4 id="error" style="color: red" class="noMargin"></h4>
</section>
<section>
<form>
<h4 class="inlineLeft noMargin weight300">Params:</h4>
<div class="inlineLeft marginLeft marginRight">
<input type="text" value="0" id="startVal" style="width:80px" class="updateCodeVis">
<label class="inlineLabel">Start</label>
</div>
<input id="swapValues" type="button" class="inlineLeft marginRight" value="Swap" style="width:80px;">
<div class="inlineLeft marginRight">
<input type="text" value="94.62" id="endVal" style="width:80px" class="updateCodeVis">
<label class="inlineLabel">End</label>
</div>
<div class="inlineLeft marginRight">
<input type="number" value="0" id="decimalPlaces" step="1" style="width:50px" class="updateCodeVis">
<label class="inlineLabel">Decimal places</label>
</div>
<div class="inlineLeft marginRight">
<input type="number" value="2" id="duration" step=".1" style="width:50px" class="updateCodeVis">
<label class="inlineLabel">Duration</label>
</div>
</form>
</section>
<section>
<form>
<h4 class="inlineLeft noMargin weight300">Options:</h4>
<div class="inlineLeft marginLeft marginRight">
<input id="useEasing" type="checkbox" checked><label class="inlineLabel updateCodeVis">Use easing</label>
</div>
<div class="inlineLeft marginRight">
<input id="useGrouping" type="checkbox" checked><label class="inlineLabel updateVodeVis">Use grouping</label>
</div>
<div class="inlineLeft marginRight">
<input type="text" value="," id="separator" style="width:25px; padding:0 5px;" class="updateCodeVis">
<label class="inlineLabel">Separator</label>
</div>
<div class="inlineLeft marginRight">
<input type="text" value="." id="decimal" style="width:25px; padding:0 5px;" class="updateCodeVis">
<label class="inlineLabel">Decimal</label>
</div>
<div class="inlineLeft marginRight">
<input type="text" value="" id="prefix" style="width:50px; padding:0 5px;" class="updateCodeVis">
<label class="inlineLabel">Prefix</label>
</div>
<div class="inlineLeft marginRight">
<input type="text" value="" id="suffix" style="width:50px; padding:0 5px;" class="updateCodeVis">
<label class="inlineLabel">Suffix</label>
</div>
</form>
</section>
<section>
<form>
<h4 class="inlineLeft noMargin weight300">Methods:</h4>
<input type="button" value="Start" id="start" class="inlineLeft marginLeft marginRight">
<input type="button" value="Pause/Resume" id="pauseResume" class="inlineLeft marginRight">
<input type="button" value="Reset" id="reset" class="inlineLeft marginRight">
<input type="button" value="Update:" id="update" class="inlineLeft" style="margin-right:5px">
<div class="inlineLeft marginRight">
<input type="text" value="6789" id="updateVal" style="width:80px">
</div>
<div class="inlineLeft">
<input type="checkbox" id="useOnComplete"><label class="inlineLabel">Alert on complete</label>
</div>
</form>
</section>
<section id="easingSection">
<form>
<h4 class="inlineLeft noMargin weight300">Custom:</h4>
<div class="inlineLeft marginLeft">
<label class="inlineLabel">Easing: &nbsp;</label>
<select id="easingFnsDropdown" class="marginRight updateCodeVis">
<option value="easeOutExpo" selected>easeOutExpo (default, built-in)</option>
<option value="outQuintic">outQuintic</option>
<option value="outCubic">outCubic</option>
</select>
</div>
<div class="inlineLeft marginRight">
<label class="inlineLabel">Numerals: &nbsp;</label>
<select id="numeralsDropdown" class="updateCodeVis">
<option value="" selected>Default ("1234")</option>
<option value="ea">Eastern Arabic ("١٢٣٤")</option>
<option value="fa">Farsi ("۱۲۳۴")</option>
</select>
</div>
<div class="inlineLeft">
<input type="button" id="apply" value="Apply">
</div>
</form>
</section>
<section class="marginBottom">
<div class="col full marginBottom marginTop">
<div class="code-contain indigo">
<code id="codeVisualizer" class="indigo"></code>
</div>
</div>
</section>
</div>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/PZMN/countUp.js.git
git@gitee.com:PZMN/countUp.js.git
PZMN
countUp.js
countUp.js
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385