Skip to content

Instantly share code, notes, and snippets.

<style>
* {margin:0;padding:0;list-style:none;}
.Enix_tab_hd {width:300px;height:30px;_overflow:hidden;margin:20px 0px 0px 20px;border-bottom:1px solid #999;}
.Enix_tab_hd a {float:left;height:29px;line-height:29px;padding:0px 10px;margin-left:10px;border:1px solid #999;border-bottom:0;background-color:#ccc;}
.Enix_tab_hd a.on {_position:relative;height:30px;background-color:#fff;}
.Enix_tab_bd {clear:both;margin-top:10px;margin-left:20px;width:300px;}
</style>
@aispin
aispin / regex-css-import.js
Created May 31, 2013 08:47
A regex pattern for matching css's inline import url.
//Paste the code below into chrome's console and press enter!
//Thanks to @alextang https://github.com/ikitty
var css = "@import url('file1.css');\r\n"+
"@import url('file2.css');\r\n"+
".test3{\r\n"+
" height: 1px;\r\n"+
"}";
function copyToClipboard( text ){
var copyDiv = document.createElement('div');
copyDiv.contentEditable = true;
document.body.appendChild(copyDiv);
copyDiv.innerHTML = text;
copyDiv.unselectable = "off";
copyDiv.focus();
document.execCommand('SelectAll');
document.execCommand("Copy", false, null);
document.body.removeChild(copyDiv);
@amowu
amowu / game_math.md
Created January 10, 2015 15:11
游戏动画必备干货——跟动画有关的数学和物理公式

原文出處

买了一本《html5+javascript动画基础》来看,里面很多数学和物理知识,跟着里面的例子学习了一遍。国庆回家的时候,看到我两年前买的一本《Flash ActionSctipt 3.0动画教程》,里面的内容差不多,作者也一样,只是都没有看过,于是又把这本书的例子又练习了一遍,加深印象。我觉得动画里面最难的就是 那些公式吧,语言都有相似之处,可能过几年作者还会写一本《processing动画基础》也说不定。思路是核心,其他都换汤不换药,所以我打算把跟动画有关的数学和物理知识整理下,几种不同的语言整理在一起方便比较,也方便以后用的时候查找。

角度与弧度互转

js