Skip to content

Instantly share code, notes, and snippets.

@schadeck
schadeck / connectHTMLelements_SVG.png
Created May 31, 2022 20:15 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@schadeck
schadeck / dabblet.css
Created April 4, 2017 18:23 — forked from anonymous/dabblet.css
(C)Leanest CSS spinner ever
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
@schadeck
schadeck / coordinates.js
Created November 28, 2016 18:04 — forked from jonathantneal/coordinates.js
Exposing more coordinates to the DOM
(function () {
function define(object, properties) {
for (var property in properties) !(property in object) && Object.defineProperty(object, property, { get: properties[property], enumerable: true });
}
define(Element.prototype, {
width: function () {
return this.getBoundingClientRect().width;
},
height: function () {
@schadeck
schadeck / dabblet.css
Created October 21, 2013 14:42 — forked from LeaVerou/dabblet.css
Easy trapezoids with 3D transforms
/**
* Easy trapezoids with 3D transforms
*/
p {
position: relative;
display: inline-block;
padding: 1em;
margin: 2em;
}
@schadeck
schadeck / dabblet.css
Created October 21, 2013 14:39 — forked from LeaVerou/dabblet.css
Slanted tabs with CSS 3D transforms
/**
* Slanted tabs with CSS 3D transforms
* See http://lea.verou.me/2013/10/slanted-tabs-with-css-3d-transforms/
*/
body { padding: 50px; }
nav {
position: relative;
z-index: 1;
@schadeck
schadeck / dabblet.css
Created October 7, 2013 17:20 — forked from LeaVerou/dabblet.css
Easy trapezoids with 3D transforms
/**
* Easy trapezoids with 3D transforms
*/
p {
position: relative;
display: inline-block;
padding: 1em;
margin: 2em;
}
@schadeck
schadeck / dabblet.css
Created July 29, 2013 14:21 — forked from LeaVerou/dabblet.css
Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
/**
* Loading animation like the one seen on http://www.freeger.com/projects/contextad/ with CSS
* Caveat: Not DRY. The content needs to be repeated in a data- attribute (or directly in the CSS).
*/
body {
background: #ccc51c;
min-height: 100%;
}
@schadeck
schadeck / dabblet.css
Created April 28, 2013 18:57
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@schadeck
schadeck / dabblet.css
Created April 8, 2013 14:42
demo to explain chained transforms
/**
* demo to explain chained transforms
*/
* { margin: 0; }
.wrap, .wrap * { display: block; width: 4em; height: 4em; }
.wrap { outline: dashed 1px dodgerblue; margin: 13em auto 0; }
.deg45 {
position: absolute;
animation: ani 8s infinite;
}
@schadeck
schadeck / dabblet.css
Created July 10, 2012 03:39 — forked from dstorey/dabblet.css
set the size of the boxes and any decoration
.slider {
/* set initial width */
width: 520px;
/* hide the content that overflows (to allow second box to show through) */
overflow: hidden;
display: inline-block;
/* skew container so that it has angled edge, and set up transition */
transform: skewX(-20deg);