Movatterモバイル変換


[0]ホーム

URL:


Yasuhito Yabe, profile picture
Uploaded byYasuhito Yabe
6,045 views

「html5 boilerplate」から考える、これからのマークアップ

「14th Knock!」 第14回Knock! Knock! 勉強会(2013年 4月 19日、B-nest静岡市産学交流センターにて)http://knock3.hamnaly.com/vol14/

Embed presentation

Downloaded 15 times
「HTML5 Boilerplate」から考える、これからのマーク ッ  ア プ        2013年 4月19日                  Knock! Knock! 勉強会
1)構成フ イ     ァ ルを確認してみよう2)各フ イ    ァ ルを検証してみよう3)も と便利にBoilerplateを使う   っ                  には
※ 今日は新しいタグとか、要素とか、そういう話はないですよ
W eb              51/20
W eb       W eb/DTP          W eb                    W eb   S1/20
Knock! Knock! ∼静岡のWeb制作者のための勉強会∼
1/20
1)構成フ イ     ァ ルを確認してみよう
h5bp-html5-boilerplate-v4.2.0-0-g0adda79.zip
隠し ァ ル  フ イ
テンプレート ァ ル                               フ イcssフ ルダ / imgフ ルダ / jsフ ルダ /     ォ           ォ        ォapple-touch-icon群 / favicon.ico /index.html / 404.html /crossdmain.xml / humans.txt / robot.txt /.htaccessdocsフ ルダ / LICENSE.md /     ォREADME.md / CHANGELOG.md                          ドキ メン フ イ                            ュ ト ァ ル
cssフ ルダ / imgフ ルダ / jsフ ルダ /     ォ          ォ         ォapple-touch-icon群 / favicon.ico /index.html / 404.html /crossdmain.xml / humans.txt / robot.txt /.htaccessdocsフ ルダ / LICENSE.md /     ォREADME.md / CHANGELOG.md
2)各フ イ    ァ ルを検証してみよう
2-1)index.html
<!DOCTYPE html><!--[if lt IE 7]>   <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]>      <html class="no-js lt-ie9 lt-ie8"> <![endif]--><!--[if IE 8]>      <html class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><head>   <meta charset="utf-8">   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">   <title></title>   <meta name="description" content="">   <meta name="viewport" content="width=device-width">   <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->   <link rel="stylesheet" href="css/normalize.css">   <link rel="stylesheet" href="css/main.css">   <script src="js/vendor/modernizr-2.6.2.min.js"></script></head><body><!--[if lt IE 7]>   <p class="chromeframe">You are using an <strong>outdated</strong> browser.   Please <a href="http://browsehappy.com/">upgrade your browser</a> or   <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p><![endif]--><!-- Add your site or application content here --><p>Hello world! This is HTML5 Boilerplate.</p><script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"></script>')</script><script src="js/plugins.js"></script><script src="js/main.js"></script><!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --><script>   var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];   (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];   g.src='//www.google-analytics.com/ga.js';   s.parentNode.insertBefore(g,s)}(document,'script'));</script></body></html>
<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--><!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><head>
IEの条件分岐コメント × html要素CSSハックやIE専用CSSファイルに換わる手法IEのバージョンによ て、 要素のク          っ html    ラス属性を変更 例)IE7の場合 → <html class="no-js lt-ie9 lt-ie8">
<script src="//ajax.googleapis.com/ajax/libs/   jquery/1.9.1/jquery.min.js"></script> <script>window.jQuery || document.write(      '<script src="js/vendor/jquery-1.9.1.min.js"></script>'   )</script> <script src="js/plugins.js"></script>     CDNの読み込みと <script src="js/main.js"></script>        フ ォールバック <!-- Google Analytics:   change UA-XXXXX-X to be your site's ID. -->(GAト   ラッキングタ    グ→省略) </body>          JavaScriptはBody要素の閉じタグの直前
JavaScriptの記述はbody要素の閉じタグ直前表示速度の最適化 → JSの読込中はHTMLレンダ ングがスト                 リ     ップ  (少しでも早くレンダ ングした方がユーザーの待たされている感が少ない)            リ → jQueryでは、           ページの読み込みが終わっ ら                       てか   処理を開始す  るパターンが多い。   それな HTMLの最後でも問題ないよね        ら、  (HTMLの読み込み = DOMの構築を待ってから処理を始めるため)
CDNの読み込みとフォールバックCDNの読み込みは、  プロトコル http / https)                 (            を省略 → htmlファ ルに合ったプロトコルを自動的に選択         イ   ただし、 配布元のSSL対応には注意CDNに接続できない場合のフォールバック → 接続できない場合のみ、ローカルのファ ルを参照                     イ  (表示速度向上のため、有名ライブラリのキャッシュ イ                          ファ ルを効率的に使う)
2-2-1)normalize.css
Normalize.css ?表示をゼロにしない(sup や sub を使えば上付き、下付きになるし、 は箇条書きになる)                           ulバグ補正( pre 要素における font-size、 9 における SVG の overflow の挙動など)                       IECSS 解析時に、必要以上のゴミとなるコードを作らない(リセット系 CSS は結果的にゴミとなる margin:0 などが大量に挿入される)必要に応じて不要箇所を削除しても OK( Nomalize.css は適切にコメントで区切られていて、不要箇所は削除が簡単)                        http://www.yomotsu.net/blog/2013/02/23/normalize.html
normalize.css か reset.css か好きなヤツを使えばいいじゃん…
2-2-2)main.css
画像置換
.ir { background-color: transparent;      border: 0;      overflow: hidden;      *text-indent: -9999px; /* IE 6/7 fallback */}.ir:before { content: "";              display: block;              width: 0;              height: 150%;}
<h1 class="logo ir">    静岡のWeb系勉強会/セミナー Knock! Knock!</h1>.logo {     width: 220px;     height: 160px;     background: url(/img/logo.png) no-repeat;}
数種類の非表示処理
/* * Hide from both screenreaders and browsers */         ヴ ジュ             ィ アル上もス リー  ク ンリーダーでも消え      る.hidden {   display: none !important;   visibility: hidden;}
/* Hide only visually,   but have it available for screenreaders */                  ス リー                   ク ンリーダーでは読み上げ.visuallyhidden {    ヴ ジュ                       ィ アル上では消える    border: 0;            clip: rect(0 0 0 0);    height: 1px;          margin: -1px;    overflow: hidden;      padding: 0;    position: absolute;   width: 1px;}
/* Hide visually and from screenreaders,   but maintain layout */         ィ アル/ス リー       ヴ ジュ         ク ンリーダーからは消え      る.invisible {              レイ ト                             アウ 上は残る   visibility: hidden;}
簡素化されていくclearfix
.clearfix:before, .clearfix:after {   content: " ";   display: table;}.clearfix:after {   clear: both;}.clearfix {   *zoom: 1; /* For IE 6/7 only */}
サンプル Media Queries
min-widthの単位はem@media only screen and (min-width: 35em) {  /* Style adjustments for viewports that meet the condition */}These examples override the primary ('mobile first') styles.@media print,                 (モバイ   ルファーストな基本ス ルを上書きする)                                                  タイ     (-o-min-device-pixel-ratio: 5/4),     (-webkit-min-device-pixel-ratio: 1.25),     (min-resolution: 120dpi) {  /* Style adjustments for high resolution devices */}
2-3-1)Modernizer.js
Modernizer.js ?Modernizr is a JavaScript library thatdetects HTML5 and CSS3 features inthe user’ browser.         s                        http://modernizr.com/Modernizrは HTML 5とユーザーのブラウザにCSS 3の機能を検出するJavaScriptライブラリです。                         (Google 翻訳)
<html class="no-js" lang="ja"><html class=" js flexbox canvas canvastext webglno-touch geolocation postmessage websqldata-base indexeddb hashchange history dragand-drop websockets rgba hsla multiplebgs back-groundsize borderimage borderradius boxshad-ow textshadow opacity cssanimations csscol-umns cssgradients cssreflections csstransformscsstransforms3d csstransitions fontface generat-edcontent video audio localstorage sessionstor-age webworkers applicationcache svg inlinesvgsmil svgclippaths" lang="ja">
2-3-1)plugin.js
// Avoid `console` errors in browsers that lack a console.(function() {   var method;   var noop = function () {};   var methods = [      'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',      'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',consoleに対応していないブラウザでも      'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',      'timeStamp', 'trace', 'warn'   ];  エラー表示を出さないようにする   var length = methods.length;   var console = (window.console = window.console || {});   while (length--) {      method = methods[length];       if (!console[method]) {          console[method] = noop;      }   }}());
2-4).htaccess
・カスタム404ページ・Google Chrome Frameを呼び出す設定・MIME Type・URL Rewrite wwwア /ナシの統一とか)           (     リ
3)も と便利にBoilerplateを使う   っ                  には
基本テンプレートを選択
テンプレートをカス イ         タマ ズ
まとめ
・HTML5 Boilerplateには様々な ウハウがギッシリ                       ノ・次世代のマーク ッ レン        ア プト ドもキャッチア プ                    ッ・自分の作業テンプレート ア プデートし うぜ            も ッ     よ !
実装に困っ ら     た ご連絡ください!
本日はあ がと ございま    り う     した ご連絡・ご質問など下記までお願いし            ます   E-mail : info@hamnaly.com  Facebook / Twitter : yabecchy

Recommended

PPTX
HTML5 on ASP.NET
PDF
jQuery Performance Tips – jQueryにおける高速化 -
KEY
EC-CUBEプラグイン講義
PDF
大規模サイトにおける本当は怖いCSSの話
PDF
⑯jQueryをおぼえよう!その2
PDF
HTML5 & The Web Platform
PDF
今必要なCSSアーキテクチャ
PPTX
Oocssとかついでにsmacssとbemの話も
PDF
なんでCSSすぐ死んでしまうん
PDF
HTML5, きちんと。
PDF
基礎から見直す ASP.NET MVC の単体テスト自動化方法 ~ Windows Azure 関連もあるかも~
PDF
React で CSS カプセル化の可能性を考える
PDF
今からハジメるHTML5マークアップ
PDF
HTML仕様書を読んでみよう
PDF
Nuxt なしで Vue App 作る時に乗り越えるべき5つの壁
PDF
.htaccessによるリダイレクト徹底解説
PDF
WordPress を使いこなそう
PDF
CSS Design and Programming
PPTX
13016 n分で作るtype scriptでnodejs
PDF
Web Platform -- Moving Forward!
PDF
XPagesDay2014 A-4 XPages with jQueryMobile BADプラクティスガイド
PPTX
20140926 mt cloud_handson_seminar
PPTX
20141206 handson
PDF
WordPressとjQuery
PDF
gulp + sass で目指せ倍速コーディング(東区フロントエンド勉強会 2015年 第1回) 本編
KEY
WordPressプラグイン作成入門
PDF
Polymerで作る次世代ウェブサイト
PDF
WordPress初心者からの脱出! カスタムなんとかをちゃんと理解する
PPTX
パララックスでレスポンシブでJ query mobileなサイトのつくりかた
KEY
コーディングが上達するコツ

More Related Content

PPTX
HTML5 on ASP.NET
PDF
jQuery Performance Tips – jQueryにおける高速化 -
KEY
EC-CUBEプラグイン講義
PDF
大規模サイトにおける本当は怖いCSSの話
PDF
⑯jQueryをおぼえよう!その2
PDF
HTML5 & The Web Platform
PDF
今必要なCSSアーキテクチャ
PPTX
Oocssとかついでにsmacssとbemの話も
HTML5 on ASP.NET
jQuery Performance Tips – jQueryにおける高速化 -
EC-CUBEプラグイン講義
大規模サイトにおける本当は怖いCSSの話
⑯jQueryをおぼえよう!その2
HTML5 & The Web Platform
今必要なCSSアーキテクチャ
Oocssとかついでにsmacssとbemの話も

What's hot

PDF
なんでCSSすぐ死んでしまうん
PDF
HTML5, きちんと。
PDF
基礎から見直す ASP.NET MVC の単体テスト自動化方法 ~ Windows Azure 関連もあるかも~
PDF
React で CSS カプセル化の可能性を考える
PDF
今からハジメるHTML5マークアップ
PDF
HTML仕様書を読んでみよう
PDF
Nuxt なしで Vue App 作る時に乗り越えるべき5つの壁
PDF
.htaccessによるリダイレクト徹底解説
PDF
WordPress を使いこなそう
PDF
CSS Design and Programming
PPTX
13016 n分で作るtype scriptでnodejs
PDF
Web Platform -- Moving Forward!
PDF
XPagesDay2014 A-4 XPages with jQueryMobile BADプラクティスガイド
PPTX
20140926 mt cloud_handson_seminar
PPTX
20141206 handson
PDF
WordPressとjQuery
PDF
gulp + sass で目指せ倍速コーディング(東区フロントエンド勉強会 2015年 第1回) 本編
KEY
WordPressプラグイン作成入門
PDF
Polymerで作る次世代ウェブサイト
PDF
WordPress初心者からの脱出! カスタムなんとかをちゃんと理解する
なんでCSSすぐ死んでしまうん
HTML5, きちんと。
基礎から見直す ASP.NET MVC の単体テスト自動化方法 ~ Windows Azure 関連もあるかも~
React で CSS カプセル化の可能性を考える
今からハジメるHTML5マークアップ
HTML仕様書を読んでみよう
Nuxt なしで Vue App 作る時に乗り越えるべき5つの壁
.htaccessによるリダイレクト徹底解説
WordPress を使いこなそう
CSS Design and Programming
13016 n分で作るtype scriptでnodejs
Web Platform -- Moving Forward!
XPagesDay2014 A-4 XPages with jQueryMobile BADプラクティスガイド
20140926 mt cloud_handson_seminar
20141206 handson
WordPressとjQuery
gulp + sass で目指せ倍速コーディング(東区フロントエンド勉強会 2015年 第1回) 本編
WordPressプラグイン作成入門
Polymerで作る次世代ウェブサイト
WordPress初心者からの脱出! カスタムなんとかをちゃんと理解する

Similar to 「html5 boilerplate」から考える、これからのマークアップ

PPTX
パララックスでレスポンシブでJ query mobileなサイトのつくりかた
KEY
コーディングが上達するコツ
PDF
Mvc conf session_5_isami
PDF
Concentrated HTML5 & Attractive HTML5
PDF
HTML5
KEY
HTML5での制作、いつから始める?
PDF
GDG Women DevfestW
PDF
フロンエンドトレンドについて話そう
PDF
レスポンシブWebデザイン【発展編】
PDF
jQuery Mobile(開発編)勉強会資料
PDF
HTML5 in Firefox4
PDF
今日からはじめるHTML5 ver.2012
KEY
Webapp startup example_to_dolist
PPTX
Frontend framework and Template
PDF
フロント作業の効率化
PDF
HTML5とCSS3でWebが変わる!でも導入は簡単!
PDF
Tech.G HTML5 プレ講座
PDF
2018年に於ける HTML の役割(実践編)
PDF
Html5でword pressテーマを作るよ!
PDF
⑮jQueryをおぼえよう!その1
パララックスでレスポンシブでJ query mobileなサイトのつくりかた
コーディングが上達するコツ
Mvc conf session_5_isami
Concentrated HTML5 & Attractive HTML5
HTML5
HTML5での制作、いつから始める?
GDG Women DevfestW
フロンエンドトレンドについて話そう
レスポンシブWebデザイン【発展編】
jQuery Mobile(開発編)勉強会資料
HTML5 in Firefox4
今日からはじめるHTML5 ver.2012
Webapp startup example_to_dolist
Frontend framework and Template
フロント作業の効率化
HTML5とCSS3でWebが変わる!でも導入は簡単!
Tech.G HTML5 プレ講座
2018年に於ける HTML の役割(実践編)
Html5でword pressテーマを作るよ!
⑮jQueryをおぼえよう!その1

More from Yasuhito Yabe

PDF
jQueryでiTunes Store風スライドショーを作ってみる
PDF
イラレでWebデザインしても嫌われないデータ作成術
PDF
レスポンシブWebデザイン【基礎編】
PDF
Htmlコーディングの効率化 後編
PDF
Htmlコーディングの効率化 前編
PDF
jQuery超入門編
PDF
あらためて考えるCMS選択 2012
PDF
a-blog cms 事例紹介(TalkNote Vol.1)
PDF
静岡Web制作界隈 ゆく年くる年 2012
KEY
20111001 adobe edgeとhtml5_css3_javascrit
PDF
Web制作者のためのWebマーケティング用語と計算式
PDF
20131206 静岡web制作界隈ゆく年くる年2013
PDF
Knock! Knock! サイトができるまで
PDF
Designer Meets Bootstrap(22th Knock!)
PDF
みんビズ その傾向と対策
jQueryでiTunes Store風スライドショーを作ってみる
イラレでWebデザインしても嫌われないデータ作成術
レスポンシブWebデザイン【基礎編】
Htmlコーディングの効率化 後編
Htmlコーディングの効率化 前編
jQuery超入門編
あらためて考えるCMS選択 2012
a-blog cms 事例紹介(TalkNote Vol.1)
静岡Web制作界隈 ゆく年くる年 2012
20111001 adobe edgeとhtml5_css3_javascrit
Web制作者のためのWebマーケティング用語と計算式
20131206 静岡web制作界隈ゆく年くる年2013
Knock! Knock! サイトができるまで
Designer Meets Bootstrap(22th Knock!)
みんビズ その傾向と対策

「html5 boilerplate」から考える、これからのマークアップ

  • 1.
    「HTML5 Boilerplate」から考える、これからのマーク ッ ア プ 2013年 4月19日 Knock! Knock! 勉強会
  • 2.
    1)構成フ イ ァ ルを確認してみよう2)各フ イ ァ ルを検証してみよう3)も と便利にBoilerplateを使う っ には
  • 3.
  • 5.
    W eb 51/20
  • 6.
    W eb W eb/DTP W eb W eb S1/20
  • 7.
  • 8.
  • 9.
    1)構成フ イ ァ ルを確認してみよう
  • 11.
  • 12.
  • 13.
    テンプレート ァ ル フ イcssフ ルダ / imgフ ルダ / jsフ ルダ / ォ ォ ォapple-touch-icon群 / favicon.ico /index.html / 404.html /crossdmain.xml / humans.txt / robot.txt /.htaccessdocsフ ルダ / LICENSE.md / ォREADME.md / CHANGELOG.md ドキ メン フ イ ュ ト ァ ル
  • 14.
    cssフ ルダ /imgフ ルダ / jsフ ルダ / ォ ォ ォapple-touch-icon群 / favicon.ico /index.html / 404.html /crossdmain.xml / humans.txt / robot.txt /.htaccessdocsフ ルダ / LICENSE.md / ォREADME.md / CHANGELOG.md
  • 15.
    2)各フ イ ァ ルを検証してみよう
  • 17.
  • 18.
    <!DOCTYPE html><!--[if ltIE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--><!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <script src="js/vendor/modernizr-2.6.2.min.js"></script></head><body><!--[if lt IE 7]> <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p><![endif]--><!-- Add your site or application content here --><p>Hello world! This is HTML5 Boilerplate.</p><script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"></script>')</script><script src="js/plugins.js"></script><script src="js/main.js"></script><!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --><script> var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; g.src='//www.google-analytics.com/ga.js'; s.parentNode.insertBefore(g,s)}(document,'script'));</script></body></html>
  • 19.
    <!DOCTYPE html><!--[if ltIE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--><!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><head>
  • 20.
    IEの条件分岐コメント × html要素CSSハックやIE専用CSSファイルに換わる手法IEのバージョンによて、 要素のク っ html ラス属性を変更 例)IE7の場合 → <html class="no-js lt-ie9 lt-ie8">
  • 21.
    <script src="//ajax.googleapis.com/ajax/libs/ jquery/1.9.1/jquery.min.js"></script> <script>window.jQuery || document.write( '<script src="js/vendor/jquery-1.9.1.min.js"></script>' )</script> <script src="js/plugins.js"></script> CDNの読み込みと <script src="js/main.js"></script> フ ォールバック <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->(GAト ラッキングタ グ→省略) </body> JavaScriptはBody要素の閉じタグの直前
  • 22.
    JavaScriptの記述はbody要素の閉じタグ直前表示速度の最適化 → JSの読込中はHTMLレンダングがスト リ ップ (少しでも早くレンダ ングした方がユーザーの待たされている感が少ない) リ → jQueryでは、 ページの読み込みが終わっ ら てか 処理を開始す るパターンが多い。 それな HTMLの最後でも問題ないよね ら、 (HTMLの読み込み = DOMの構築を待ってから処理を始めるため)
  • 23.
    CDNの読み込みとフォールバックCDNの読み込みは、 プロトコルhttp / https) ( を省略 → htmlファ ルに合ったプロトコルを自動的に選択 イ ただし、 配布元のSSL対応には注意CDNに接続できない場合のフォールバック → 接続できない場合のみ、ローカルのファ ルを参照 イ (表示速度向上のため、有名ライブラリのキャッシュ イ ファ ルを効率的に使う)
  • 25.
  • 26.
    Normalize.css ?表示をゼロにしない(sup やsub を使えば上付き、下付きになるし、 は箇条書きになる) ulバグ補正( pre 要素における font-size、 9 における SVG の overflow の挙動など) IECSS 解析時に、必要以上のゴミとなるコードを作らない(リセット系 CSS は結果的にゴミとなる margin:0 などが大量に挿入される)必要に応じて不要箇所を削除しても OK( Nomalize.css は適切にコメントで区切られていて、不要箇所は削除が簡単) http://www.yomotsu.net/blog/2013/02/23/normalize.html
  • 27.
    normalize.css か reset.cssか好きなヤツを使えばいいじゃん…
  • 28.
  • 29.
  • 30.
    .ir { background-color:transparent; border: 0; overflow: hidden; *text-indent: -9999px; /* IE 6/7 fallback */}.ir:before { content: ""; display: block; width: 0; height: 150%;}
  • 31.
    <h1 class="logo ir"> 静岡のWeb系勉強会/セミナー Knock! Knock!</h1>.logo { width: 220px; height: 160px; background: url(/img/logo.png) no-repeat;}
  • 32.
  • 33.
    /* * Hidefrom both screenreaders and browsers */ ヴ ジュ ィ アル上もス リー ク ンリーダーでも消え る.hidden { display: none !important; visibility: hidden;}
  • 34.
    /* Hide onlyvisually, but have it available for screenreaders */ ス リー ク ンリーダーでは読み上げ.visuallyhidden { ヴ ジュ ィ アル上では消える border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;}
  • 35.
    /* Hide visuallyand from screenreaders, but maintain layout */ ィ アル/ス リー ヴ ジュ ク ンリーダーからは消え る.invisible { レイ ト アウ 上は残る visibility: hidden;}
  • 36.
  • 37.
    .clearfix:before, .clearfix:after { content: " "; display: table;}.clearfix:after { clear: both;}.clearfix { *zoom: 1; /* For IE 6/7 only */}
  • 38.
  • 39.
    min-widthの単位はem@media only screenand (min-width: 35em) { /* Style adjustments for viewports that meet the condition */}These examples override the primary ('mobile first') styles.@media print, (モバイ ルファーストな基本ス ルを上書きする) タイ (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { /* Style adjustments for high resolution devices */}
  • 41.
  • 42.
    Modernizer.js ?Modernizr isa JavaScript library thatdetects HTML5 and CSS3 features inthe user’ browser. s http://modernizr.com/Modernizrは HTML 5とユーザーのブラウザにCSS 3の機能を検出するJavaScriptライブラリです。 (Google 翻訳)
  • 43.
    <html class="no-js" lang="ja"><htmlclass=" js flexbox canvas canvastext webglno-touch geolocation postmessage websqldata-base indexeddb hashchange history dragand-drop websockets rgba hsla multiplebgs back-groundsize borderimage borderradius boxshad-ow textshadow opacity cssanimations csscol-umns cssgradients cssreflections csstransformscsstransforms3d csstransitions fontface generat-edcontent video audio localstorage sessionstor-age webworkers applicationcache svg inlinesvgsmil svgclippaths" lang="ja">
  • 44.
  • 45.
    // Avoid `console`errors in browsers that lack a console.(function() { var method; var noop = function () {}; var methods = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',consoleに対応していないブラウザでも 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn' ]; エラー表示を出さないようにする var length = methods.length; var console = (window.console = window.console || {}); while (length--) { method = methods[length]; if (!console[method]) { console[method] = noop; } }}());
  • 46.
  • 47.
    ・カスタム404ページ・Google Chrome Frameを呼び出す設定・MIMEType・URL Rewrite wwwア /ナシの統一とか) ( リ
  • 48.
  • 50.
  • 51.
  • 57.
  • 58.
    ・HTML5 Boilerplateには様々な ウハウがギッシリ ノ・次世代のマーク ッ レン ア プト ドもキャッチア プ ッ・自分の作業テンプレート ア プデートし うぜ も ッ よ !
  • 59.
    実装に困っ ら た ご連絡ください!
  • 60.
    本日はあ がと ございま り う した ご連絡・ご質問など下記までお願いし ます E-mail : info@hamnaly.com Facebook / Twitter : yabecchy

[8]ページ先頭

©2009-2025 Movatter.jp