在浏览器 favicon 上显示进度 很帅 很酷

Piecon

Pie charts in your favicon!

A tiny javascript library for dynamically generating progress pie charts in your favicons.

Look up at your tabs for the live demo!

Documentation

Basic usage


Piecon.setProgress(12);
Piecon.setProgress(25);
...
Piecon.reset();

Options


Piecon.setOptions({
  color: '#ff0084', // Pie chart color
  background: '#bbb', // Empty pie chart color
  shadow: '#fff', // Outer ring color
  fallback: false // Toggles displaying percentage in the title bar (possible values - true, false, 'force')
});

Browser Support

Piecon has been tested to work completely in the following browsers (older versions may be supported, but haven't been tested):

  • Chrome 15+
  • Firefox 9+
  • Opera 11+

Currently the library falls back to title updates for the following browsers:

  • Internet Explorer 9
  • Safari 5+
  •  <link rel="icon" href="favicon.ico" /> 
  •    <script src="jquery-1.8.2.min.js"></script>
  •   <script src="piecon.js"></script>
  •   <script>
  •   (function(){
  •  
  •     var count = 0;
  •     Piecon.setOptions({fallback: 'force'});
  •     var i = setInterval(function(){
  •       if (++count > 100) { Piecon.reset(); clearInterval(i); return false; }
  •       Piecon.setProgress(count);
  •     }, 250);
  •   })();
  •   
  •   </script>

不过用着用着应该是个标题党罢了 没有什么实质用处。

我的博客 http://zencart.me

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值