Glitch

MySQL, MongoDB, Python, Go

サイト制作備考録

気をつけること
基本html5マークアップ
どんどん追記予定

  • htmlのlang
<html lang="ja">
  • モバイルサイトに飛ばすときは以下のコード
var agent = navigator.userAgent;
if(agent.indexOf('Android') != -1 ||
  agent.indexOf('iPhone') != -1 ||
  agent.indexOf('iPod') != -1||
  agent.indexOf('iPad') != -1){
  location.href = './sp/';
}
  • スマホ用に以下のコード
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
  • stylesheetにnomalize.css(好み)

http://necolas.github.com/normalize.css/

<link rel="stylesheet/less" type="text/css" href="styles.less">
<script src="less.js" type="text/javascript"></script>

http://jquery.com/

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
  • OPGに対応

http://ogp.me/
別記事予定