Skip to content

Instantly share code, notes, and snippets.

View radi-cho's full-sized avatar

Radi Cho radi-cho

View GitHub Profile
<label class="switch">
<input type="checkbox" />
<span></span>
</label>
@radi-cho
radi-cho / checked1.css
Created April 6, 2017 18:08
The css code for my checkbox project...
.switch span {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 100px;
transition: all .5s;
box-shadow: 1px 2px 3px rgba(0,0,0,.1) inset;
.switch input {
opacity: 0;
position: absolute;
z-index: -1;
}
.switch input:checked+span {
background-color: #5d9cec;
border-color: #5d9cec;
transition: all .5s;
}
.switch span:after {
content: "";
position: absolute;
background-color: #fff;
.switch * {
cursor: pointer;
}
.switch.switch-lg span {
width: 50px;
height: 25px;
}
.switch.switch-lg span:after {
height: 23px;
width: 23px;
}
.switch input:checked+span {
background-color: #5d9cec;
border-color: #5d9cec;
transition: all .5s;
}
.switch.switch-lg span {
width: 50px;
height: 25px;
}
.switch span {
alert("something");
@radi-cho
radi-cho / webpack.config.js
Last active May 27, 2017 08:06
Webpack configuration file template
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/index.js",
output: {
path: __dirname + "/js",
filename: "index.min.js"
{
"presets": ["react", ["env", {
"targets": {
"browsers": [
"Firefox > 31",
"Chrome > 37"
]
},
"modules": false
}], "stage-0"]