Skip to content

Instantly share code, notes, and snippets.

@if540
if540 / _cssTable.sass
Last active January 21, 2020 19:31
css table (Bem style)
/* cssTable */
.c-cssTable
display: table
+has(thead)
display: table-header-group
+has(tbody)
display: table-row-group
@if540
if540 / URL.js
Last active February 8, 2017 00:44 — forked from Rplus/URL.js
// got website url you can
// var path = window.location.pathname; // Returns path only
// var url = window.location.href; // Returns full URL
// var page = path.split("/").pop(); // Returns page only
var url = "http://example.com:3000/pathname/?search=test#hash";
var _a = new URL(url);
_a.protocol; // => "http:"
@if540
if540 / gist:1e9d1ff8614c75adba99
Created April 10, 2015 09:10
requirejs 使用範例-來源 http://goo.gl/b73gcD
requirejs.config({
"baseUrl": ".",
"paths": {
"waypoints": "//cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints",
"jquery": "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min"
}
});
require([ "jquery", "waypoints", ], function ($, W) {
$(function () {
@if540
if540 / layout - best paragraph
Created November 16, 2014 10:20
中文網頁排版 - 段落最佳設定
// 適當閱讀行距
line-height: 1.7em;
// 齊左右
text-align: justify;
text-justify: ideographic;
// 利用 text-indent 做到首段空兩隔空白
margin: 0;
text-indent: 2em;
// 網頁呈現上,段落之間加上空白
margin-bottom: 0.5em;
@if540
if540 / .bowerrc
Last active August 29, 2015 14:08 — forked from facultymatt/.bowerrc
Bower.io 套件管理 & Grunt 任務管理
{
"directory": "components",
"analytics": false
}
@if540
if540 / HTML5andRespond.html
Last active April 6, 2022 19:33
HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lte IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
@if540
if540 / jplayer.md
Last active August 29, 2015 14:05
HTML5 Audio & Video for jQuery http://www.jplayer.org/

##概述 平台和瀏覽器支援

  • Windows: Chrome, Firefox, Internet Explorer, Safari, Opera
  • Windows (legacy) 瀏覽器相容 IE6, IE7, IE8, IE9, IE10, IE11
  • OSX: Safari, Firefox, Chrome, Opera
  • iOS: Mobile Safari: iPad, iPhone, iPod Touch
  • Android: Android 2.3 Browser
  • Blackberry: OS 7 Phone Browser, PlayBook Browser

影音格式支援

@if540
if540 / css-currentColor.md
Created August 8, 2014 07:49
Css 裡存在個變數 currentColor

...you can use this value to indicate you want to use the value of color for other properties that accept a color value: borders, box shadows, outlines, or backgrounds. This value was first supported by Opera in 2009, since then, Firefox 3.5+, Chrome 1+, and Safari 4+.


參考連結:

@if540
if540 / hotkey.md
Last active August 29, 2015 14:04
Sublime & Emmet快速鍵對照表

Sublime hotkey:

Ctrl+P //輸入關鍵字就可以開啟檔案,不用打得很完全他還是會幫你搜尋出來
Ctrl+w //關閉目前所在檔案
alt+數字鍵 // 檔案間切換

Emmet hotkey:

for sublime text 3