Skip to content

Instantly share code, notes, and snippets.

@csssecrets
csssecrets / dabblet.css
Last active September 18, 2021 20:34
Flexible ellipse
/**
* Flexible ellipse
*/
div {
width: 16em;
height: 10em;
background: #fb3;
border-radius: 50%;
}
@csssecrets
csssecrets / dabblet.css
Last active September 18, 2021 22:22
Flexible half ellipse
/**
* Flexible half ellipse
*/
div {
display: inline-block;
width: 16em;
height: 10em;
margin: 1em;
background: #fb3;
@csssecrets
csssecrets / dabblet.css
Last active February 21, 2023 18:30
Flexible quarter ellipse
/**
* Flexible quarter ellipse
*/
div {
display: inline-block;
width: 16em;
height: 10em;
margin: 1em;
background: #fb3;
@csssecrets
csssecrets / dabblet.css
Last active January 17, 2023 16:27
Parallelograms — with extra HTML element
/**
* Parallelograms — with extra HTML element
*/
.button { transform: skewX(45deg); }
.button > div { transform: skewX(-45deg); }
.button {
display: inline-block;
padding: .5em 1em;
@csssecrets
csssecrets / dabblet.css
Last active October 21, 2023 12:46
Parallelograms — with pseudoelements
/**
* Parallelograms — with pseudoelements
*/
.button {
position: relative;
display: inline-block;
padding: .5em 1em;
border: 0; margin: .5em;
background: transparent;
@csssecrets
csssecrets / dabblet.css
Created January 26, 2015 12:09
Diamond images — via clip-path
/**
* Diamond images — via clip-path
*/
img {
max-width: 250px;
margin: 20px;
-webkit-clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
transition: 1s;
@csssecrets
csssecrets / dabblet.css
Last active September 19, 2021 12:24 — forked from LeaVerou/dabblet.css
Trapezoid tabs
/**
* Trapezoid tabs
*/
body {
padding: 40px;
font: 130%/2 Frutiger LT Std, sans-serif;
}
nav {
@csssecrets
csssecrets / dabblet.css
Created January 27, 2015 17:32
Animated pie chart
/**
* Animated pie chart
*/
.pie {
width: 100px; height: 100px;
border-radius: 50%;
background: yellowgreen;
background-image: linear-gradient(to right, transparent 50%, currentColor 0);
color: #655;
@csssecrets
csssecrets / dabblet.css
Last active September 19, 2021 13:07
Static pie charts
/**
* Static pie charts
*/
.pie {
display: inline-block;
position: relative;
width: 100px;
line-height: 100px;
border-radius: 50%;
@csssecrets
csssecrets / dabblet.css
Created January 28, 2015 18:15 — forked from LeaVerou/dabblet.css
Static interpolation via paused animations
/**
* Static interpolation via paused animations
* This technique becomes more useful if you need to interpolate more than 1 properties, and/or if you need multiple values in the spectrum
* Currently works in every modern browser except Safari
*/
@keyframes foo {
from { background: red }
to { background: yellowgreen }
}