SlideShare a Scribd company logo
2011.04.02
•               Hirokazu Okawa
    twitter : @okyawa



•
•




    •
        CentOS
        Apache
        PostgreSQL
        PHP
PC
WebKit
WebKit



•

    HTML
WebKit


• Safari (iPhone Mobile Safari)

• Chrome (Android                )

• BlackBerry (OS6            )
スマートフォンサイトの作成術 - 大川洋一
• Web
• iPhone   Web
•
        980

•

    •         1500
•         (    )




    viewport
<meta name="viewport" width=”device-width;
initial-scale=1.0; maximum-scale=1.0; user-
scalable=no;" />

  • width                    (         )
    default   980
    device-width

  • initial-scale                1.0

  • maximum-scale

  • user-scalable
                    yes/no
CSS
•




    body {
      -webkit-text-size-adjust: none;
    }
スマートフォンサイトの作成術 - 大川洋一
•
•


•
           Ajax

•
    HTML
• HTML


• JSON (JavaScript Object Notation)
HTML


•       HTML

    •   Javascript   DOM

    •            PHP
JSON
• PHP                JOSN
    →

•       Javascript

•                           DOM



•
DOM

• HTML

 (appendChild   , insertBefore   )

 • HTML
• Ajax



•
Ajax




Ajax          Ajax
• Cookie

• Web Storage

  ✴

  ✴
Cookie

•


    •


•                (4KB)
Web Storage

• HTML5        API

• Cookie

    • iPhone                5MB

• Cookie             key-value

•                      (※         JSON )
•


•

• Cookie
•       (   )



•

    •
WebStorage


  obj.setItem(key,value)
   ◦
• obj.getItem(key)
   ◦
• obj.removeItem(key)
   ◦
• obj.clear()
   ◦
• obj.key(n)
   ◦n      (0        )
• obj.length
   ◦
•

    •


    •
        obj.getItem(key)

•

    •
Chrome, Safari
Developer Tools   Resources   Local Strage   Session Strage




• key Ajax                            value    JSON
//
if (window.sessionStorage) {
    sessionStorage.clear();
}

//
if (window.sessionStorage) {
    var key = 'go=product-list&mode=line&id=4page=1';
    sessionStorage.setItem(key, jsonData);
    var obj = JSON.parse(jsonData);
    jQuery(obj).each(function(index, jsonElement) {
        // preload image
        new Image().src = jsonElement.photo.url;
    });
}
//
var key = 'go=product-list&mode=line&id=4page=1';
var parseStrageData = null;
if (window.sessionStorage) {
    var strageData = sessionStorage.getItem(key)
    if (key) {
        try {
           var parseStrageData = JSON.parse(strageData);
        } catch (e) {
           parseStrageData = null;
        }
    }
}

if (parseStrageData) {
    //
} else {
   // Ajax
}
スマートフォンサイトの作成術 - 大川洋一
•

    •
        GD   PING


    •
         80px
• <img src=”chair.jpg” width=”80” />




80px                            160px
•
• CSS max-width: 100%;
•


•
<li id="listbox_132">
   <a href="javascript:void(0);">
      <img id="thumbnail_132" class="thumbnail_btn" src="thumnail_product01.png">
   </a>
</li>


var mainPhoto = [];
mainPhoto[120] = 'product01.jpg';
mainPhoto[132] = 'product02.jpg';
mainPhoto[181] = 'product03.jpg';
mainPhoto[247] = 'product04.jpg';

jQuery('.thumbnail_btn').each(function(index, elem) {
  var num = elem.id.replace(/thumbnail_/,'');
  var mainImage = new Image();
  mainImage.onload = function() {
    //
      };
      mainImage.src = mainPhoto[num];
});
スマートフォンサイトの作成術 - 大川洋一
HTML       input      type


• tel
             iPhone
• number
• email      type

• url
• <input type="tel" />
• <input type="number" />
• <input type="email" />
URL




• <input type="url" />
• <input type=”text” placeholder="   " />
•

•       2

    →

•



•
var autoFitTextareaHeight = function (elem, keyCode, fit) {
  // backspace or delete or onblor
  if (keyCode === 8 || keyCode === 46 || fit) {
      elem.style.height = 'auto';
  }
  if (elem.offsetHeight < elem.scrollHeight) {
      elem.style.height = elem.scrollHeight + 'px';
  }
}

autoFitTextareaHeight(elem);
jQuery(elem).bind('keyup', function (event) {
    autoFitTextareaHeight(event.target, event.keyCode, false);
});
jQuery(elem).bind('blur', function (event) {
    autoFitTextareaHeight(event.target, event.keyCode, true);
});
スマートフォンサイトの作成術 - 大川洋一
• window.orientation

  •   0

  •   90

  •   -90

  •   180
• orientationchange

  • iPhone


  •
<body onorientationchange="alert('
        ');">



window.addEventListener('orientationchange', function () {
  alert('                    ');
}, false);
Android

   •   orientationchange




                 resize

window.addEventListener('resize', orientFunc, false);
• window.onresize            iPhone
              (maximum call stack size exceeded)



      • iPhone
var eventName = 'resize';
if (-1 < navigator.userAgent.indexOf('iPhone') || -1 <
navigator.userAgent.indexOf('iPod')) {
    eventName = 'orientationchange';
}
window.addEventListener(eventName, sampleFunc, false);
スマートフォンサイトの作成術 - 大川洋一
•

•


•
    IE
スマートフォンサイトの作成術 - 大川洋一
PC
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
iPhone

                            20px

• iPhone    GS              60px

 320px × 480px

                            356px
• iPhone
 640px × 960px
 (         320px × 480px)

                            44px
Android
• 320px × 480px
• 480px × 800px
• 480px × 854px
• 640px × 960px
• 960px × 480px

•
    320px
•
URL




  • URL
          (60px)



  •
URL


function hideUrlBar() {
  setTimeout(function () {
     if (scrollY < 60) {
         scrollTo(0, 1);
     }
  }, 1);
}
PC


• PC
スマートフォンサイトの作成術 - 大川洋一
<a href="tel:1-408-555-5555">1-408-555-5555</a>
•



               651-0096        651-0096


     •
                                meta

<meta name="format-detection" content="telephone=no"/>
YouTube

<a href="youtube:    ID">       </a>
<a href="http://www.youtube.com/v/     ID">      </a>
<a href="http://www.youtube.com/watch?v=      ID">      </a>

  •a
    YouTube

  • YouTube

       YouTube
スマートフォンサイトの作成術 - 大川洋一
<a href="maps:q=           ">     </a>
<a href="http://maps.google.com/maps?q=         ">       </a>
<a href="http://maps.google.co.jp/maps?q=           ">   </a>
<a href="http://maps.google.co.jp/maps?q=   ,   +          ">
    </a>
スマートフォンサイトの作成術 - 大川洋一
iPhone



• Mac

• iOS SDK
スマートフォンサイトの作成術 - 大川洋一
Android

• Android SDK

• Windows
 Mac OS X (intel)
 Linux (i386)

• Andorid
       Platform
[Ctrl]+[F12]

[Ctrl]+[F11]
Opera Mobile



• Opera Mobile emulator

•
Opera Mini

• Opera Mini Simulator

•

•
                  Opera




•                  Opera
BlackBerry

• BlackBerry Smartphone
    Simulators


• Windows XP 7
    Java JDK, Eclipse3.6

•
    Eclipse

    MDS Services Simulator Package
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
Windows Phone



• Windows Phone Developer Tools
• Windows Vista   Windows7
スマートフォンサイトの作成術 - 大川洋一
•
• CSS
PC
<link media="screen and (min-device-
width:481px)" rel="stylesheet" type="text/
css" href="pcsite.css" />

    iPhone
<link media="only screen and (max-
device-width:480px)"
href="smartphone.css" type="text/css"
rel="stylesheet" />
• iUi
• iWebKit
• Universal iPhone UI Kit
• jQTouch
  • WebKit

• jQueryMobile
  •
スマートフォンサイトの作成術 - 大川洋一
• Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/
  528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16

• Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/
  528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16

• Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like
  Gecko) Version/3.0 Mobile/3A100a Safari/419.3

• Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; SonyEricssonSO-01B Build/R1EA018)
  AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1

• Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.0176/1150; U; ja) Presto/2.4.15

• BlackBerry9000/4.6.0.224 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/220
スマートフォンサイトの作成術 - 大川洋一
•                   •

    • touchstart        • gesturestart
    • touchend          • gesturechange
    • touchmove         • gestureend
    • touchcancel
•       mousewheel

    •
                         2



    •                2
               1
スマートフォンサイトの作成術 - 大川洋一
•

•

•

•
スマートフォンサイトの作成術 - 大川洋一
Ad

More Related Content

What's hot (20)

Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
St. Petersburg College
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
Gill Cleeren
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
Jarrod Overson
 
Wordpress Beyond Websites
Wordpress Beyond WebsitesWordpress Beyond Websites
Wordpress Beyond Websites
Scott Saunders
 
Real World Web Standards
Real World Web StandardsReal World Web Standards
Real World Web Standards
gleddy
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
dmethvin
 
Александр Кашеверов - Polymer
Александр Кашеверов - PolymerАлександр Кашеверов - Polymer
Александр Кашеверов - Polymer
DataArt
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
Robert Nyman
 
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGapFake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
glen_a_smith
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
Morgan Cheng
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack Toronto
Maximiliano Firtman
 
Progressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesProgressively Enhancing WordPress Themes
Progressively Enhancing WordPress Themes
Digitally
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
dmethvin
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend Workflow
DelphiCon
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
glen_a_smith
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
Aaron Gustafson
 
jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014
dmethvin
 
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 features
Gill Cleeren
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
John McCaffrey
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Daosheng Mu
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
St. Petersburg College
 
Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!Top 10 HTML5 features every developer should know!
Top 10 HTML5 features every developer should know!
Gill Cleeren
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
Jarrod Overson
 
Wordpress Beyond Websites
Wordpress Beyond WebsitesWordpress Beyond Websites
Wordpress Beyond Websites
Scott Saunders
 
Real World Web Standards
Real World Web StandardsReal World Web Standards
Real World Web Standards
gleddy
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
dmethvin
 
Александр Кашеверов - Polymer
Александр Кашеверов - PolymerАлександр Кашеверов - Polymer
Александр Кашеверов - Polymer
DataArt
 
HTML5 workshop, part 1
HTML5 workshop, part 1HTML5 workshop, part 1
HTML5 workshop, part 1
Robert Nyman
 
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGapFake Your Way as a Mobile Developer Rockstar with PhoneGap
Fake Your Way as a Mobile Developer Rockstar with PhoneGap
glen_a_smith
 
High Performance Mobile Web
High Performance Mobile WebHigh Performance Mobile Web
High Performance Mobile Web
Morgan Cheng
 
High Performance Web - Full Stack Toronto
High Performance Web - Full Stack TorontoHigh Performance Web - Full Stack Toronto
High Performance Web - Full Stack Toronto
Maximiliano Firtman
 
Progressively Enhancing WordPress Themes
Progressively Enhancing WordPress ThemesProgressively Enhancing WordPress Themes
Progressively Enhancing WordPress Themes
Digitally
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
dmethvin
 
Frontend Workflow
Frontend WorkflowFrontend Workflow
Frontend Workflow
DelphiCon
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
glen_a_smith
 
Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]Performance as User Experience [AEADC 2018]
Performance as User Experience [AEADC 2018]
Aaron Gustafson
 
jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014jQuery Conference Chicago - September 2014
jQuery Conference Chicago - September 2014
dmethvin
 
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 features
Gill Cleeren
 
Windy cityrails performance_tuning
Windy cityrails performance_tuningWindy cityrails performance_tuning
Windy cityrails performance_tuning
John McCaffrey
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Daosheng Mu
 

Viewers also liked (7)

設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化
masaaki komori
 
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
Junko Nukaga
 
ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門
Hayato Mizuno
 
レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎
masaaki komori
 
Webデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼうWebデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼう
Toshiaki Sasaki
 
ノンデザイナーのための配色理論
ノンデザイナーのための配色理論ノンデザイナーのための配色理論
ノンデザイナーのための配色理論
tsukasa obara
 
色彩センスのいらない配色講座
色彩センスのいらない配色講座色彩センスのいらない配色講座
色彩センスのいらない配色講座
Mariko Yamaguchi
 
設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化設計から実装まで、今すぐ始める高速化
設計から実装まで、今すぐ始める高速化
masaaki komori
 
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
文系デザイナーでも大丈夫!レスポンシブWEBサイトをWordPressで作ってみよう
Junko Nukaga
 
ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門ノンプログラマーのためのjQuery入門
ノンプログラマーのためのjQuery入門
Hayato Mizuno
 
レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎レスポンシブ・ウェブデザイン基礎
レスポンシブ・ウェブデザイン基礎
masaaki komori
 
Webデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼうWebデザインのセオリーを学ぼう
Webデザインのセオリーを学ぼう
Toshiaki Sasaki
 
ノンデザイナーのための配色理論
ノンデザイナーのための配色理論ノンデザイナーのための配色理論
ノンデザイナーのための配色理論
tsukasa obara
 
色彩センスのいらない配色講座
色彩センスのいらない配色講座色彩センスのいらない配色講座
色彩センスのいらない配色講座
Mariko Yamaguchi
 
Ad

Similar to スマートフォンサイトの作成術 - 大川洋一 (20)

Web app
Web appWeb app
Web app
조 용구
 
Web app
Web appWeb app
Web app
조 용구
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
Adam Lu
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
Sho Ito
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
Naga Harish M
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
Adam Lu
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
Roy Clarkson
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Todd Anglin
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信
Makoto Kato
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Doris Chen
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack Day
Ted Drake
 
HTML5 History & Features
HTML5 History & FeaturesHTML5 History & Features
HTML5 History & Features
Dave Ross
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
Chris Morrell
 
Iphone Presentation for MuMe09
Iphone Presentation for MuMe09Iphone Presentation for MuMe09
Iphone Presentation for MuMe09
Gonzalo Parra
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
Michael Galpin
 
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
Jinho Jung
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
Marcelio Leal
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
Yottaa
 
Mobile web-debug
Mobile web-debugMobile web-debug
Mobile web-debug
FINN.no
 
InfoTalk#17 1st
InfoTalk#17 1stInfoTalk#17 1st
InfoTalk#17 1st
Wakasa Masao
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
Adam Lu
 
Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~Attractive HTML5~開発者の視点から~
Attractive HTML5~開発者の視点から~
Sho Ito
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
Naga Harish M
 
Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)Html5 on Mobile(For Developer)
Html5 on Mobile(For Developer)
Adam Lu
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
Roy Clarkson
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Todd Anglin
 
e10sとアプリ間通信
e10sとアプリ間通信e10sとアプリ間通信
e10sとアプリ間通信
Makoto Kato
 
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Doris Chen
 
HTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack DayHTML5 Hacking - Yahoo! Open Hack Day
HTML5 Hacking - Yahoo! Open Hack Day
Ted Drake
 
HTML5 History & Features
HTML5 History & FeaturesHTML5 History & Features
HTML5 History & Features
Dave Ross
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
Chris Morrell
 
Iphone Presentation for MuMe09
Iphone Presentation for MuMe09Iphone Presentation for MuMe09
Iphone Presentation for MuMe09
Gonzalo Parra
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
Michael Galpin
 
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
디자인 패턴과 YUI를 이용해 Rich UI 빠르게 구현하기
Jinho Jung
 
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
So you want to build a mobile app - HTML5 vs. Native @ the Boston Mobile Expe...
Yottaa
 
Mobile web-debug
Mobile web-debugMobile web-debug
Mobile web-debug
FINN.no
 
Ad

Recently uploaded (20)

Basic PPT Template - Blue and Grey Motif
Basic PPT Template - Blue and Grey MotifBasic PPT Template - Blue and Grey Motif
Basic PPT Template - Blue and Grey Motif
roxanneb37
 
Outcome over Output: How UXers can leverage an Outcome-based mindset
Outcome over Output: How UXers can leverage an Outcome-based mindsetOutcome over Output: How UXers can leverage an Outcome-based mindset
Outcome over Output: How UXers can leverage an Outcome-based mindset
Malini Rao
 
Basic PPT Template - Yellow, Green Motif
Basic PPT Template - Yellow, Green MotifBasic PPT Template - Yellow, Green Motif
Basic PPT Template - Yellow, Green Motif
roxanneb37
 
exploring human values through eeg and deep learning methods
exploring human values through eeg and deep learning methodsexploring human values through eeg and deep learning methods
exploring human values through eeg and deep learning methods
shobhabasavaraj762
 
Atmospheric Aramco Pitch from Atmospheric
Atmospheric Aramco Pitch from AtmosphericAtmospheric Aramco Pitch from Atmospheric
Atmospheric Aramco Pitch from Atmospheric
jacksonudy1
 
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's WorkPWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
INKPPT
 
Eeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docx
Eeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docxEeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docx
Eeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docx
PlfiGergely
 
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregfCONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
bjtjhj
 
Hhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffj
Hhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffjHhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffj
Hhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffj
n42140457
 
Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...
Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...
Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...
elnarababayeva2000
 
FLOOR-PLAN Junior high school architecture planning.docx
FLOOR-PLAN Junior high school architecture planning.docxFLOOR-PLAN Junior high school architecture planning.docx
FLOOR-PLAN Junior high school architecture planning.docx
JamelaTeo
 
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Yantram Animation Studio Corporation
 
Digital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client TestimonialDigital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client Testimonial
Adeline Yeo
 
Recycled Materials and Eco-Design for design students.pptx
Recycled Materials and Eco-Design for design students.pptxRecycled Materials and Eco-Design for design students.pptx
Recycled Materials and Eco-Design for design students.pptx
Prof. Hany El-Said
 
mastering the art of drone design and analysis.pdf
mastering the art of drone design and analysis.pdfmastering the art of drone design and analysis.pdf
mastering the art of drone design and analysis.pdf
VikasBokka
 
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
INKPPT
 
Accenture Life Trends 2023 – How Brands & Humans Are Evolving Together
Accenture Life Trends 2023 – How Brands & Humans Are Evolving TogetherAccenture Life Trends 2023 – How Brands & Humans Are Evolving Together
Accenture Life Trends 2023 – How Brands & Humans Are Evolving Together
INKPPT
 
Artificial Intelligence and IPR.pptx.pdf
Artificial Intelligence and IPR.pptx.pdfArtificial Intelligence and IPR.pptx.pdf
Artificial Intelligence and IPR.pptx.pdf
elagnamsuit
 
KPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation Trends
KPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation TrendsKPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation Trends
KPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation Trends
INKPPT
 
Private Jet Pilot Training Workshop _ by Slidesgo.pptx
Private Jet Pilot Training Workshop _ by Slidesgo.pptxPrivate Jet Pilot Training Workshop _ by Slidesgo.pptx
Private Jet Pilot Training Workshop _ by Slidesgo.pptx
sapohaf902
 
Basic PPT Template - Blue and Grey Motif
Basic PPT Template - Blue and Grey MotifBasic PPT Template - Blue and Grey Motif
Basic PPT Template - Blue and Grey Motif
roxanneb37
 
Outcome over Output: How UXers can leverage an Outcome-based mindset
Outcome over Output: How UXers can leverage an Outcome-based mindsetOutcome over Output: How UXers can leverage an Outcome-based mindset
Outcome over Output: How UXers can leverage an Outcome-based mindset
Malini Rao
 
Basic PPT Template - Yellow, Green Motif
Basic PPT Template - Yellow, Green MotifBasic PPT Template - Yellow, Green Motif
Basic PPT Template - Yellow, Green Motif
roxanneb37
 
exploring human values through eeg and deep learning methods
exploring human values through eeg and deep learning methodsexploring human values through eeg and deep learning methods
exploring human values through eeg and deep learning methods
shobhabasavaraj762
 
Atmospheric Aramco Pitch from Atmospheric
Atmospheric Aramco Pitch from AtmosphericAtmospheric Aramco Pitch from Atmospheric
Atmospheric Aramco Pitch from Atmospheric
jacksonudy1
 
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's WorkPWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
PWC – Workforce of the Future 2030 | Four Scenarios Shaping Tomorrow's Work
INKPPT
 
Eeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docx
Eeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docxEeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docx
Eeeeeeezfhedjdjdjrjrnrnrkddjdjdjdrnrnnn.docx
PlfiGergely
 
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregfCONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
CONTENT MARKETING.pdf vfhfhfbdvdfvdfregf
bjtjhj
 
Hhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffj
Hhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffjHhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffj
Hhjkkkkgggggjkjgfhkkkkhgde5uiooitrdffffj
n42140457
 
Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...
Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...
Forest Education Presentation In Green Beige Nature Watercolor Style_20250516...
elnarababayeva2000
 
FLOOR-PLAN Junior high school architecture planning.docx
FLOOR-PLAN Junior high school architecture planning.docxFLOOR-PLAN Junior high school architecture planning.docx
FLOOR-PLAN Junior high school architecture planning.docx
JamelaTeo
 
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Elevating Urban Skylines: The Power of High-Rise Exterior Renderings by Yantr...
Yantram Animation Studio Corporation
 
Digital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client TestimonialDigital Marketing Mock Project - Client Testimonial
Digital Marketing Mock Project - Client Testimonial
Adeline Yeo
 
Recycled Materials and Eco-Design for design students.pptx
Recycled Materials and Eco-Design for design students.pptxRecycled Materials and Eco-Design for design students.pptx
Recycled Materials and Eco-Design for design students.pptx
Prof. Hany El-Said
 
mastering the art of drone design and analysis.pdf
mastering the art of drone design and analysis.pdfmastering the art of drone design and analysis.pdf
mastering the art of drone design and analysis.pdf
VikasBokka
 
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
McKinsey – Mobility Consumer Pulse 2024 | Global Trends in EVs, Shared Mobili...
INKPPT
 
Accenture Life Trends 2023 – How Brands & Humans Are Evolving Together
Accenture Life Trends 2023 – How Brands & Humans Are Evolving TogetherAccenture Life Trends 2023 – How Brands & Humans Are Evolving Together
Accenture Life Trends 2023 – How Brands & Humans Are Evolving Together
INKPPT
 
Artificial Intelligence and IPR.pptx.pdf
Artificial Intelligence and IPR.pptx.pdfArtificial Intelligence and IPR.pptx.pdf
Artificial Intelligence and IPR.pptx.pdf
elagnamsuit
 
KPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation Trends
KPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation TrendsKPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation Trends
KPMG – Global Tech Report 2022 | Web3, Metaverse & Digital Transformation Trends
INKPPT
 
Private Jet Pilot Training Workshop _ by Slidesgo.pptx
Private Jet Pilot Training Workshop _ by Slidesgo.pptxPrivate Jet Pilot Training Workshop _ by Slidesgo.pptx
Private Jet Pilot Training Workshop _ by Slidesgo.pptx
sapohaf902
 

スマートフォンサイトの作成術 - 大川洋一

  • 2. Hirokazu Okawa twitter : @okyawa •
  • 3. • CentOS Apache PostgreSQL PHP
  • 4. PC
  • 6. WebKit • HTML
  • 7. WebKit • Safari (iPhone Mobile Safari) • Chrome (Android ) • BlackBerry (OS6 )
  • 10. • iPhone Web
  • 11. 980 • • 1500
  • 12. ( ) viewport
  • 13. <meta name="viewport" width=”device-width; initial-scale=1.0; maximum-scale=1.0; user- scalable=no;" /> • width ( ) default 980 device-width • initial-scale 1.0 • maximum-scale • user-scalable yes/no
  • 14. CSS
  • 15. body { -webkit-text-size-adjust: none; }
  • 17.
  • 18. • • Ajax • HTML
  • 19. • HTML • JSON (JavaScript Object Notation)
  • 20. HTML • HTML • Javascript DOM • PHP
  • 21. JSON • PHP JOSN → • Javascript • DOM •
  • 22. DOM • HTML (appendChild , insertBefore ) • HTML
  • 24. Ajax Ajax Ajax
  • 25. • Cookie • Web Storage ✴ ✴
  • 26. Cookie • • • (4KB)
  • 27. Web Storage • HTML5 API • Cookie • iPhone 5MB • Cookie key-value • (※ JSON )
  • 29. ( ) • •
  • 30. WebStorage obj.setItem(key,value) ◦ • obj.getItem(key) ◦ • obj.removeItem(key) ◦ • obj.clear() ◦ • obj.key(n) ◦n (0 ) • obj.length ◦
  • 31. • • obj.getItem(key) • •
  • 32. Chrome, Safari Developer Tools Resources Local Strage Session Strage • key Ajax value JSON
  • 33. // if (window.sessionStorage) { sessionStorage.clear(); } // if (window.sessionStorage) { var key = 'go=product-list&mode=line&id=4page=1'; sessionStorage.setItem(key, jsonData); var obj = JSON.parse(jsonData); jQuery(obj).each(function(index, jsonElement) { // preload image new Image().src = jsonElement.photo.url; }); }
  • 34. // var key = 'go=product-list&mode=line&id=4page=1'; var parseStrageData = null; if (window.sessionStorage) { var strageData = sessionStorage.getItem(key) if (key) { try { var parseStrageData = JSON.parse(strageData); } catch (e) { parseStrageData = null; } } } if (parseStrageData) { // } else { // Ajax }
  • 36. • GD PING • 80px
  • 37. • <img src=”chair.jpg” width=”80” /> 80px 160px
  • 40. <li id="listbox_132"> <a href="javascript:void(0);"> <img id="thumbnail_132" class="thumbnail_btn" src="thumnail_product01.png"> </a> </li> var mainPhoto = []; mainPhoto[120] = 'product01.jpg'; mainPhoto[132] = 'product02.jpg'; mainPhoto[181] = 'product03.jpg'; mainPhoto[247] = 'product04.jpg'; jQuery('.thumbnail_btn').each(function(index, elem) { var num = elem.id.replace(/thumbnail_/,''); var mainImage = new Image(); mainImage.onload = function() { // }; mainImage.src = mainPhoto[num]; });
  • 42. HTML input type • tel iPhone • number • email type • url
  • 47. • <input type=”text” placeholder=" " />
  • 48. • • 2 → • •
  • 49. var autoFitTextareaHeight = function (elem, keyCode, fit) { // backspace or delete or onblor if (keyCode === 8 || keyCode === 46 || fit) { elem.style.height = 'auto'; } if (elem.offsetHeight < elem.scrollHeight) { elem.style.height = elem.scrollHeight + 'px'; } } autoFitTextareaHeight(elem); jQuery(elem).bind('keyup', function (event) { autoFitTextareaHeight(event.target, event.keyCode, false); }); jQuery(elem).bind('blur', function (event) { autoFitTextareaHeight(event.target, event.keyCode, true); });
  • 51. • window.orientation • 0 • 90 • -90 • 180
  • 52. • orientationchange • iPhone •
  • 53. <body onorientationchange="alert(' ');"> window.addEventListener('orientationchange', function () { alert(' '); }, false);
  • 54. Android • orientationchange resize window.addEventListener('resize', orientFunc, false);
  • 55. • window.onresize iPhone (maximum call stack size exceeded) • iPhone var eventName = 'resize'; if (-1 < navigator.userAgent.indexOf('iPhone') || -1 < navigator.userAgent.indexOf('iPod')) { eventName = 'orientationchange'; } window.addEventListener(eventName, sampleFunc, false);
  • 59. PC
  • 62. iPhone 20px • iPhone GS 60px 320px × 480px 356px • iPhone 640px × 960px ( 320px × 480px) 44px
  • 63. Android • 320px × 480px • 480px × 800px • 480px × 854px • 640px × 960px • 960px × 480px • 320px
  • 64.
  • 65. URL • URL (60px) •
  • 66. URL function hideUrlBar() { setTimeout(function () { if (scrollY < 60) { scrollTo(0, 1); } }, 1); }
  • 70. 651-0096 651-0096 • meta <meta name="format-detection" content="telephone=no"/>
  • 71. YouTube <a href="youtube: ID"> </a> <a href="http://www.youtube.com/v/ ID"> </a> <a href="http://www.youtube.com/watch?v= ID"> </a> •a YouTube • YouTube YouTube
  • 73. <a href="maps:q= "> </a> <a href="http://maps.google.com/maps?q= "> </a> <a href="http://maps.google.co.jp/maps?q= "> </a> <a href="http://maps.google.co.jp/maps?q= , + "> </a>
  • 77. Android • Android SDK • Windows Mac OS X (intel) Linux (i386) • Andorid Platform
  • 79. Opera Mobile • Opera Mobile emulator •
  • 80. Opera Mini • Opera Mini Simulator • • Opera • Opera
  • 81. BlackBerry • BlackBerry Smartphone Simulators • Windows XP 7 Java JDK, Eclipse3.6 • Eclipse MDS Services Simulator Package
  • 87. Windows Phone • Windows Phone Developer Tools • Windows Vista Windows7
  • 89.
  • 91. PC <link media="screen and (min-device- width:481px)" rel="stylesheet" type="text/ css" href="pcsite.css" /> iPhone <link media="only screen and (max- device-width:480px)" href="smartphone.css" type="text/css" rel="stylesheet" />
  • 92. • iUi • iWebKit • Universal iPhone UI Kit • jQTouch • WebKit • jQueryMobile •
  • 94. • Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/ 528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16 • Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/ 528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16 • Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A100a Safari/419.3 • Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; SonyEricssonSO-01B Build/R1EA018) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 • Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.0176/1150; U; ja) Presto/2.4.15 • BlackBerry9000/4.6.0.224 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/220
  • 96. • • touchstart • gesturestart • touchend • gesturechange • touchmove • gestureend • touchcancel
  • 97. mousewheel • 2 • 2 1