Skip to content

Instantly share code, notes, and snippets.

View liuyanghejerry's full-sized avatar
Focusing

liuyanghejerry liuyanghejerry

Focusing
View GitHub Profile
@liuyanghejerry
liuyanghejerry / index.html
Last active January 21, 2016 13:41 — forked from anonymous/index.html
Short sample to illustrate :lang() // source https://jsbin.com/yowaro
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.target:lang(zh) {
color: green;
}
<!DOCTYPE html>
<html>
<head>
<script src="http://fb.me/react-0.14.3.js"></script>
<script src="http://fb.me/react-dom-0.14.3.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.rating-table {
border: 0;
@liuyanghejerry
liuyanghejerry / RouteTransition.jsx
Created November 6, 2015 12:48 — forked from maisano/RouteTransition.jsx
Using react-motion with react-router
import React, { PropTypes } from 'react';
import { TransitionMotion, spring } from 'react-motion';
/**
* One example of using react-motion (0.3.0) within react-router (v1.0.0-rc3).
*
* Usage is simple, and really only requires two things–both of which are
* injected into your app via react-router–pathname and children:
*
* <RouteTransition pathname={this.props.pathname}>
@liuyanghejerry
liuyanghejerry / index.html
Last active September 15, 2015 09:06 — forked from anonymous/index.html
css that only select `ul` has and only has 5 children.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0,minimal-ui">
<title>JS Bin</title>
<style id="jsbin-css">
li:nth-child(1):nth-last-child(5),
li:nth-child(1):nth-last-child(5) ~ li {
background-color: pink;
@liuyanghejerry
liuyanghejerry / index.html
Last active August 29, 2015 14:25 — forked from anonymous/index.html
Component switch animation with React
<!DOCTYPE html>
<html>
<head>
<script src="http://fb.me/react-with-addons-0.13.1.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.parent {
position: relative;
}
@liuyanghejerry
liuyanghejerry / index.html
Last active August 29, 2015 14:24 — forked from anonymous/index.html
文字等宽对齐demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
ul {
width: 180px;
}
li {
#!/bin/sh
rpm -Uih https://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
curl -L https://get.rvm.io | bash -s stable
rvm install 2.0.0
rvm use 2.0.0@global --default
# for chinese user, if you have a wonderful speed ignore this part
# to have a faster download speed
# switch gem source to ruby.taobao.org
@liuyanghejerry
liuyanghejerry / 0_reuse_code.js
Created December 28, 2013 12:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console