代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Checkbix</title>
<link rel="shortcut icon" href="demo/favicon.png">
<link rel="apple-touch-icon image_src" href="demo/favicon.png">
<meta property="og:type" content="website" />
<meta property="og:image" itemprop="image primaryImageOfPage" content="demo/favicon.png" />
<meta name="twitter:title" content="Checkbix">
<meta name="twitter:description" content="Simple lightweight vanilla Javascript plugin for enhancing checkboxes.">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@urre">
<meta name="twitter:creator" content="@urre">
<meta name="twitter:url" content="https://urre.github.io/checkbix/">
<meta name="twitter:image" content="demo/favicon.png">
<link rel="me" href="https://twitter.com/urre" >
<link rel="author" href="humans.txt">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/default.min.css">
<link rel="stylesheet" href="dist/css/checkbix.min.css">
<link rel="stylesheet" href="demo/demo.css">
</head>
<body>
<a href="https://github.com/urre/checkbix" class="github-corner"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#ccc; color:#fff; position: absolute; top: 0; border: 0; right: 0;"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<h1>Checkbix</h1>
<h2>Simple vanilla Javascript plugin for enhancing checkboxes using CSS.</h2>
<h3>Accessible, lightweight and easy to use. No dependencies.</h3>
<div class="stats"></div>
<a href="https://travis-ci.org/urre/checkbix"><img src="https://travis-ci.org/urre/checkbix.svg?branch=master" alt="Travis build"> </a>
<a class="github-button" href="https://github.com/urre/checkbix" data-icon="octicon-star" data-count-href="/urre/checkbix/stargazers" data-count-api="/repos/urre/checkbix#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star urre/checkbix on GitHub">Star</a>
<a class="github-button" href="https://github.com/urre" data-count-href="/urre/followers" data-count-api="/users/urre#followers" data-count-aria-label="# followers on GitHub" aria-label="Follow @urre on GitHub">Follow @urre</a>
<a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Checkbix%20-%20-Simple%20lightweight%20vanilla%20Javascript%20plugin%20for%20enhancing%20checkboxes.">
Tweet</a>
<h2>Usage</h2>
<h3>Default</h3>
<input id="mycheckbox" type="checkbox" class="checkbix" data-text="Checkbix">
<pre><code class="html">
<input id="mycheckbox" type="checkbox" class="checkbix" data-text="Checkbix">
</code></pre>
<h3>Size</h3>
<input id="mycheckbox2" type="checkbox" class="checkbix" data-text="Large, checked" data-size="large" checked>
<pre><code class="html">
<input id="myothercheckbox" type="checkbox" class="checkbix" data-text="Checkbix. Large, checked" data-size="large" checked>
</code></pre>
<h3>Shape</h3>
<p>Square is default</p>
<input id="mycheckbox3" type="checkbox" class="checkbix" data-shape="circled" data-text="Circled">
<pre><code class="html">
<input id="mycheckbox3" type="checkbox" class="checkbix" data-text="Circled. Large, checked" data-shape="circled">
</code></pre>
<h3>Colors</h3>
<input id="mycheckbox4" type="checkbox" class="checkbix" data-shape="circled" data-color="black" data-text="Black, circled" checked>
<pre><code class="html">
<input id="mycheckbox4" type="checkbox" class="checkbix" data-shape="circled" data-color="black" data-text="Black, circled" checked>
</code></pre>
<input id="mycheckbox5" type="checkbox" class="checkbix" data-color="blue" data-text="Blue" checked>
<pre><code class="html">
<input id="mycheckbox5" type="checkbox" class="checkbix" data-color="blue" data-text="Blue" checked>
</code></pre>
<input id="mycheckbox6" type="checkbox" class="checkbix" data-shape="circled" data-size="large" data-color="red" data-text="Red, large" checked>
<pre><code class="html">
<input id="mycheckbox6" type="checkbox" class="checkbix" data-size="large" data-color="red" data-text="Red, large" checked>
</code></pre>
<input id="mycheckbox7" type="checkbox" class="checkbix" data-color="gray" data-text="Gray" checked>
<pre><code class="html">
<input id="mycheckbox7" type="checkbox" class="checkbix" data-color="gray" data-text="Gray" checked>
</code></pre>
<input id="mycheckbox8" type="checkbox" class="checkbix" data-shape="circled" data-color="orange" data-text="Orange, circled" checked>
<pre><code class="html">
<input id="mycheckbox8" type="checkbox" class="checkbix" data-shape="circled" data-color="orange" data-text="Orange, circled" checked>
</code></pre>
<h3>Customize ARIA label</h3>
<input id="mycheckbox9" type="checkbox" class="checkbix" data-shape="circled" data-color="black" data-text="Black, circled" data-arialabel="Checkbix is nice" checked>
<pre><code class="html">
<input id="mycheckbox9" type="checkbox" class="checkbix" data-shape="circled" data-color="orange" data-text="Black, circled" data-arialabel="Checkbix is nice" checked>
</code></pre>
<h2>Install</h2>
<pre><code class="bash">
bower install checkbix.js
</code></pre>
<pre><code class="bash">
npm install checkbix
</code></pre>
<h3>Include files</h3>
<pre><code class="html">
<link rel="stylesheet" href="dist/css/checkbix.min.css">
</code></pre>
<pre><code class="html">
<script src="dist/js/checkbix.min.js"></script>
</code></pre>
<h3>Init</h3>
<pre><code class="Javascript">
<script>
Checkbix.init();
</script>
</code></pre>
<footer class="footer" role="footer">
<small>Made by <a href="https://twitter.com/urre">Urban Sandén</a></small>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="dist/js/checkbix.min.js"></script>
<script>
Checkbix.init();
var getBytesWithUnit = function( bytes ){
if( isNaN( bytes ) ){ return; }
var units = [ ' bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB' ];
var amountOf2s = Math.floor( Math.log( +bytes )/Math.log(2) );
if( amountOf2s < 1 ){
amountOf2s = 0;
}
var i = Math.floor( amountOf2s / 10 );
bytes = +bytes / Math.pow( 2, 10*i );
if( bytes.toString().length > bytes.toFixed(3).toString().length ){
bytes = bytes.toFixed(3);
}
return bytes + units[i];
};
var request = new XMLHttpRequest();
request.open('GET', 'stats.json', true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var data = JSON.parse(request.responseText);
console.log(data);
var stats = document.getElementsByClassName('stats');
stats[0].innerHTML = 'CSS ' + getBytesWithUnit(data['cssminsize']) + '<br>' + 'CSS gzip ' + getBytesWithUnit(data['cssgzipsize']) + '<br>' + 'JS ' + getBytesWithUnit(data['jsminsize']) + '<br>' + 'JS gzip ' + getBytesWithUnit(data['jsgzipsize']);
}
};
request.send();
</script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script>window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function(f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));</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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-5407647-68', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。