Skip to content

Instantly share code, notes, and snippets.

@kmelve
kmelve / progressbar.css
Last active February 24, 2019 11:23
jQuery snippet for making a progressbar for reading position in browser.
#progresswrapper {
position: fixed;
top: 0px;
height: 2px;
width: 100%;
z-index: 1000;
}
#progressbar {
top: 0;
position: fixed;
@stereokai
stereokai / gist:36dc0095b9d24ce93b045e2ddc60d7a0
Last active July 10, 2024 00:23
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}
@atomkirk
atomkirk / ios-camera.html
Created March 13, 2020 04:49
iOS Safari Camera API
<video id="player" autoplay muted playsinline> </video>
<button id="capture">Capture</button>
<canvas id="canvas" width=320 height=240></canvas>
<script>
const player = document.getElementById('player');
const canvas = document.getElementById('canvas');
const context = canvas.getContext('2d');
const captureButton = document.getElementById('capture');
const constraints = {