Skip to content

Instantly share code, notes, and snippets.

View ChanMenglin's full-sized avatar

陈孟林 ChanMenglin

  • 中国湖北
  • 17:59 (UTC +08:00)
View GitHub Profile
// ES6
// 解构json对象可以快速从json对象取值
let jsonData = {
id: 42,
status: "OK",
data: [867, 5309]
};
let { id, status, data: number } = jsonData;
@ChanMenglin
ChanMenglin / bg-attachment-fixed-parallax.markdown
Last active August 15, 2018 07:56
bg-attachment:fixed parallax
@ChanMenglin
ChanMenglin / index.html
Last active August 15, 2018 07:58
Roller coaster loader
<div class="loader">
<span></span>
<span></span>
<span></span>
</div>
@ChanMenglin
ChanMenglin / index.pug
Last active August 15, 2018 07:54
Periodic Table of Elements - HTML/CSS
- var categories = ['alkali-metals','alkaline-earth-metals','lanthanoids','actinoids','transition-metals','post-transition-metals','metalloids','other-nonmetals','noble-gasses','unknown']
// ELEMENT MIXIN TEMPLATE
mixin element(number, symbol, name, mass, weight, material, column, row)
.element(class=material)(class='c'+column)(class='r'+row)
input.activate(type='radio', name='elements')
input.deactivate(type='radio', name='elements')
.overlay
.square
.model
@ChanMenglin
ChanMenglin / css-illustration-1-bicycle.markdown
Last active August 15, 2018 07:52
CSS Illustration #1 - Bicycle
@ChanMenglin
ChanMenglin / index.html
Created August 17, 2018 01:05
Rainbow Loader
<div class="loader">
<div class="loader-inner">
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
<div class="loader-line-wrap">
<div class="loader-line"></div>
</div>
<div class="loader-line-wrap">
<div class="loader-line"></div>
@ChanMenglin
ChanMenglin / index.html
Created August 17, 2018 01:07
rainbow galaxy
<canvas id=c></canvas>
<a href=http://hd4desktop.com/669-colours-circle-rainbow-hd-wallpaper/><img src=http://hd4desktop.com/images/m/a-colours-circle-rainbow-HD-Wallpaper.jpg ></a>
@ChanMenglin
ChanMenglin / index.haml
Created August 17, 2018 01:10
Rainbow spinner
.loader
.spinner.yellow
.spinner.orange
.spinner.red
.spinner.pink
.spinner.violet
.spinner.mauve
.spinner.light-yellow
@ChanMenglin
ChanMenglin / index.slim
Created August 17, 2018 01:13
Tabbed navigation
.tabs
.tabs__background
.tabs__tab.tabs__tab--first.is-active This is a tab
.tabs__tab.tabs__tab--second This is another (longer) tab
@ChanMenglin
ChanMenglin / full-page-folder-tab-navigation.markdown
Created August 17, 2018 01:15
Full page, folder tab navigation

Full page, folder tab navigation

Move your cursor over the folders and tabs to progress through each page, no clicking necessary, no JavaScript.

A Pen by Menglin Chen on CodePen.

License.