This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ellipsis { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
<!-- サイドバー(幅を固定) --> | |
<div id="sidebar"> | |
</div> | |
<!-- メインカラム(幅可変) --> | |
<div id="main"> | |
<div id="main-content"> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ol { | |
counter-reset: item 2; | |
} | |
li:before { | |
content: counter(item)"."; | |
counter-increment: item; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="canonical" href="サイトアドレス"> | |
<link rel="help" href="アドレス/help.html" title="ヘルプ"> | |
<link rel="contents" href="/sitemap.html"> | |
<link rel="stylesheet" href="CSSファイル名" type="text/css"> | |
<link rel=”shortcut icon” href=”favicon.ico”> | |
<link rel="index" href="/index.html"> | |
<link rel="start" href="サイトアドレス" title="タイトル"> | |
<link rel="prev" href="001.htm"> | |
<link rel="next" href="003.htm"> | |
<link rel="search" href="検索ページURL"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function () { | |
var d = document; | |
if(!window.jQuery){ | |
var s = d.createElement('script'); | |
s.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'; | |
d.body.appendChild(s); | |
} | |
setTimeout(function(){ | |
// ここに処理を書きます。 | |
}, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function () { | |
$.fn.getBgPosition = function () { | |
var $elm = $(this).eq(0); | |
var defVal = $elm.css('background-position'); | |
var positions = {}; | |
if (defVal) { | |
var valAry = defVal.split(' '); | |
positions = { | |
x: parseInt(valAry[0], 10), | |
y: parseInt(valAry[1], 10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.kern { | |
text-rendering: optimizeLegibility; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isSp () { | |
var ua = navigator.userAgent; | |
if (ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var throttle = (function () { | |
var interval = 500; // 間引き間隔 | |
var lastTime = new Date().getTime() - interval; | |
return function () { | |
// 最後に実行した時間から間引きしたい時間が経過していたら実行 | |
if ((lastTime + interval) <= new Date().getTime()) { | |
lastTime = new Date().getTime(); | |
// 処理 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add www | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^mysite\.com [NC] | |
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301] |