Skip to content

Instantly share code, notes, and snippets.

View rleaf's full-sized avatar
📚

Ryan Lin rleaf

📚
View GitHub Profile
@rleaf
rleaf / index.html
Last active March 18, 2023 22:24
Three.js "mixed mode": DOM element with shadow and shine.
<script src="https://threejs.org/build/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
<script src="https://threejs.org/examples/js/renderers/CSS3DRenderer.js"></script>
<div id="css"></div>
<div id="webgl"></div>
@rleaf
rleaf / background-noise-canvas.markdown
Created February 8, 2020 05:09
Background Noise - Canvas
@rleaf
rleaf / index.html
Created December 11, 2019 00:48
Masonry Gallery
<section class="container-fluid gallery bg-faded">
<header>
<h1 class="text-center">Masonry Gallery</h1>
</header>
<div class="grid">
<a href="#" class="grid__item grid__sizer">
<div class="item__overlay">
<button class="js-button btn btn-secondary-outline center-block" data-toggle="modal" data-target="#modalPicture" type="button" value="Expand photo" role="button">Expand photo</button>
</div>
<img src="http://ultraimg.com/images/photo-1.jpg" alt="Credits to Unsplash.com" />
@rleaf
rleaf / bootstrap-lightbox-image-gallery.markdown
Created December 10, 2019 20:45
Bootstrap Lightbox Image Gallery
@rleaf
rleaf / index.html
Created December 10, 2019 18:47
Ionic Modal - Fullscreen images
<html ng-app="ionicApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Ionic Fullscreen Image</title>
<link href="//code.ionicframework.com/1.0.0-rc.1/css/ionic.min.css" rel="stylesheet">
<script src="//code.ionicframework.com/1.0.0-rc.1/js/ionic.bundle.js"></script>
</head>
@rleaf
rleaf / index.html
Created December 10, 2019 18:29
Responsive Bootstrap Masonry Gallery
<body>
<h1 class="text-center">Responsive Bootstrap Masonry Gallery</h1>
<div class="container">
<div class="gallery row">
<!-- 3 -->
<div class="gallery-list col-md-4 col-xs-6">
<div class="image-grid">
<img src="https://static.pexels.com/photos/7919/pexels-photo.jpg">
@rleaf
rleaf / basic-animation-using-jquery.markdown
Created December 8, 2019 16:53
Basic animation using jquery
@rleaf
rleaf / script.js
Created December 7, 2019 18:45
Zero-Element Blueprint Paper CSS Background
/*To-Do
-Make gradients cross browser
http://stackoverflow.com/questions/7546638/css3-cross-browser-linear-gradient
-Clean up :before and :after structure for both html and body
-Make every nth line 1px thicker, or less opaque(accomplished in gradient)
*/
/*
background: rgba(87,196,250,1);
background: -moz-radial-gradient(center, ellipse cover, rgba(87,196,250,1) 0%, rgba(10,128,254,1) 100%);
@rleaf
rleaf / css3-on-scroll-fade-in-navigation-background.markdown
Created December 7, 2019 17:48
CSS3 on scroll fade in navigation background

CSS3 on scroll fade in navigation background

I had a comment on a previous pen (http://codepen.io/willpaige/pen/optzh) that they had used exactly the same technique, but using CSS instead. So I decided to give it a go!

Its a useful animation/style when using a fixed nav which needs more definition further down the page.

A Pen by Will Paige on CodePen.

License.

@rleaf
rleaf / css-click-to-enlarge-image-in-light-box.markdown
Created December 4, 2019 03:03
CSS Click to enlarge image in light box