Skip to content

Instantly share code, notes, and snippets.

View xiaxianlin's full-sized avatar

夏显林 xiaxianlin

View GitHub Profile
@xiaxianlin
xiaxianlin / index.haml
Created September 6, 2016 08:03
pure CSS shaded cube wheels (no Firefox)
.assembly
- 2.times do
.wheel
.rotor
- 12.times do
.cube
- 5.times do
.cube__face
.container {
width: 160px;
height: 90px;
margin: 100px auto;
background: #58a;
background: radial-gradient(circle at top left, transparent 15px, #58a 0) top left,
radial-gradient(circle at top right, transparent 15px, #58a 0) top right,
radial-gradient(circle at bottom right, transparent 15px, #58a 0) bottom right,
radial-gradient(circle at bottom left, transparent 15px, #58a 0) bottom left;
background-size: 50% 50%;
.container {
width: 160px;
height: 90px;
margin: 100px auto;
background: #58a;
background: linear-gradient(135deg, transparent 15px, #58a 0) top left,
linear-gradient(-135deg, transparent 15px, #58a 0) top right,
linear-gradient(-45deg, transparent 15px, #58a 0) bottom right,
linear-gradient(45deg, transparent 15px, #58a 0) bottom left;
background-size: 50% 50%;
.container {
width: 160px;
height: 90px;
margin: 100px auto;
background: #58a;
background: linear-gradient(135deg, transparent 15px, #58a 0) top left,
linear-gradient(-135deg, transparent 15px, #58a 0) top right,
linear-gradient(-45deg, transparent 15px, #58a 0) bottom right,
linear-gradient(45deg, transparent 15px, #58a 0) bottom left;
background-size: 50% 50%;
@xiaxianlin
xiaxianlin / dabblet.css
Last active June 29, 2016 01:19
Untitled
.container {
width: 160px;
height: 90px;
margin: 100px auto;
background: #58a;
background: linear-gradient(135deg, transparent 15px, #58a 0) top left,
linear-gradient(-135deg, transparent 15px, #58a 0) top right,
linear-gradient(-45deg, transparent 15px, #58a 0) bottom right,
linear-gradient(45deg, transparent 15px, #58a 0) bottom left;
background-size: 50% 50%;
.container {
width: 160px;
height: 90px;
margin: 100px auto;
background: linear-gradient(-45deg, transparent 15px, lightblue 0)
}
@xiaxianlin
xiaxianlin / dabblet.css
Last active June 27, 2016 02:30
Untitled
.container{
overflow: hidden;
/*overflow:scroll;*/
float: left;
/*float: right;*/
position: absolute;
display: inline-block;
/*display: table-cell;*/
/*display: table-caption;*/
}
.btn{
position: relative;
width: 100px;
height:30px;
text-align: center;
line-height: 30px;
color: #fff;
margin: 150px auto;
background: #58a;
}
.btn{
position: relative;
width: 100px;
text-align: center;
line-height: 30px;
color: #fff;
margin: 150px auto;
background: #58a;
}
.btn:before,
@xiaxianlin
xiaxianlin / dabblet.css
Last active May 5, 2016 08:36
Untitled
.btn{
position: relative;
width: 100px;
text-align: center;
line-height: 30px;
color: #fff;
margin: 150px auto;
background: #58a;
}
.btn:before,