Tinycon 可在浏览器的网站图标上显示冒泡的数字,支持 Chrome 和 Firefox 浏览器,如下图所示:
可以通过npm install tommoor/tinycon --save安装使用。
使用方法很简单:Tinycon.setBubble(number);
number为需要显示的数字。
可以对显示数字的样式进行设置:
Tinycon.setOptions({
width: 7,
height: 9,
font: '10px arial',
color: '# ffffff',
background: '# 549A2F',
fallback: true
});
tinycon的github地址为:https://github.com/tommoor/tinycon
关键字:JavaScript, tinycon, 浏览器, number