SlideShare ist ein Scribd-Unternehmen logo
1 von 33
HTML5 and CSS3- One UI for All
Mobile Phone Form Factors
Puneet Kumar, Mobile Team, IFS
Intuit Proprietary & Confidential
2
Agenda
•HTML5 Crash course(20min)
•CSS3 Crash course(10min)
•Responsive Design(10 min)
– Problem definition
– Current Solution
– Proposed Solution
– How can Responsive Design help!
Intuit Proprietary & Confidential
Logistics
• This presentation is Part 1 of HTML/CSS Workshop at
TechForum, Intuit, Feb 21, 2012
• This presentation at Brainstorm:
https://intuit.intuitbrainstorm.com/Idea.aspx?
id=11398
• Q&A, at the end
• Post questions to
http://tiles.intuit.com/tiles/site/tile/HTML5#
3
Intuit Proprietary & Confidential
HTML5, Crash Course
4
Intuit Proprietary & Confidential
HTML5 Features
• New Doctype
• Semantic Tags
• Forms, new input types
• Video, Audio
• Canvas
• Web Storage
• Offline
• Web Workers
• GeoLocation
• Drag and drop
5
Many cool features to explore
Intuit Proprietary & Confidential
HTML5, New Doctype
• <!DOCTYPE html>
6
<!DOCTYPE html>
Benefit:
Simple.
• <!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans
itional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
Intuit Proprietary & Confidential
HTML5, Semantic tags
• <header>
• <hgroup>
• <article>
• <section>
• <aside>
• <footer>
• <nav>
7
Better than <div>
Benefit:
Human readable
HTML pages.
Intuit Proprietary & Confidential8
HTML4 HTML5
HTML5, Semantic tags
#.header{…}
#.navigator{…}
#.sidebar{…}
CSS: CSS:
header{…}
nav {…}
aside{…}
Semantic
Intuit Proprietary & Confidential
HTML5, Forms, new input types
• <input type=email>
• <input type=url>
• <input type=date>
• <input type=time>
• <input type=datetime>
• <input type=month>
• <input type=week>
• <input type=number>
• <input type=tel>
• <input type=color>
• <input pattern=“[0-9][A-Z]{3}”>
9
<input type= >
Benefit:
Built in
validation.
Intuit Proprietary & Confidential
HTML5, Forms, new input types
• <form action="" method="get">
<label for=”tel">type:tel</label>
<input id=”tel" name=”tel" type=”tel" />
<button type="submit"> Submit Form </button>
</form>
• <ul contenteditable=“true”>
<li>First</li>
</ul>
10
<input type=“tel”> will show number pad
Intuit Proprietary & Confidential
HTML5, <video> <audio>
•video controls preload>
<source src="cohagenPhoneCall.ogv" type="video/ogg; cod
ecs='vorbis, theora'" />
<source src="cohagenPhoneCall.mp4" type="video/mp4; 'c
odecs='avc1.42E01E, mp4a.40.2'" />
<p> Your browser is old. <a href="cohagenPhoneCall.mp4"
>Download this video instead.</a> </p>
</video>
11
<video> <audio>
Benefit:
Flash killer?
Intuit Proprietary & Confidential
HTML5, Canvas
• <canvas></canvas>
• Dynamic rendering of 2D
shapes and bitmap images.
12
<canvas>
Benefit:
2D Games!
Intuit Proprietary & Confidential
HTML5, Canvas
• <canvas id=“ex” width=“200” height=“200”>
• var ctx = document.getElementById(‘ex’).getContext(‘2d’);
ctx.fillRect(10,20,50,50); //Paints rectangle (x,y,w,h)
ctx.strokeStyle=‘rgb(0,255,0)’;
ctx.lineWidth= 5;
ctx.strokeRect(9,19,52,52);
• gradient = ctx.createLinearGradient(0,0,0,canvas.height);
gradient.addColorStop(0,”#fff”);
gradient.addColorStop(1,”000”);
ctx.fillStyle = gradient;
• https://developer.mozilla.org/en/Canvas_tutorial/Basic_usage
13
Intuit Proprietary & Confidential
HTML5, Web Storage
• Web Storage- key value
– localStorage
– sessionStorage
– .setItem(‘data’, 12);
– .getItem(‘data’);
– .removeItem(‘data’)
– .clear()
– sessionStorage.length
– sessionStorage.key(i)
– Trap: Stored as Strings!
14
Better than cookies
Benefit:
Cookies on
steroids
Intuit Proprietary & Confidential
HTML5, Web SQL database
• Web SQL Storage- SQL database
• var db;
if(window.openDatabase){
db = openDatabase(‘myDB’, ‘1.0’, ‘test db’, 2 *1024 *1024);
db.transaction(function (tx) {
tx.executeSql(‘CREATE TABLE IF NOT EXISTS test(id, date, testdata)’,
[], function(){
)};//executeSql
)};//db.transaction
}
15
SQL syntax
Benefit:
Database in
Browser!
Intuit Proprietary & Confidential
HTML5, Offline
• Offline
• Application works even after network connectivity is
lost.
• Manifest file needs to know what to cache.
• <html manifest=“/time.manifest”>
• Apache mimes.types:
– text/cache-manifest manifest
16
No network, no problem
Intuit Proprietary & Confidential
HTML5, Web Workers
• Web workers
• var worker=new Worker(“myworker.js”);
worker.postMessage(“hello”);
worker.onMessage = function(event){
alert(‘The worker sent ’ + event.data);
};
//In myworker.js:
onmessage = function(event){
if(event.data == “hello”){
postMessage(“hello main”)
}else{
postMessage(“Busy right now!”);
}
}
17
multi threading
Benefit:
Responsive
pages
Intuit Proprietary & Confidential
HTML5, Geolocation
.Found You!
•if(navigator.geolocation){
– navigator.geolocation.getCurrentPosition(function(position){
var coord = position.coords;
showMap(coords.latitude, coords.longitude, coords.accuracy);
– });
}
•.watchPosition();
•.clearPosition();
18
geolocation
Intuit Proprietary & Confidential
CSS3
• CSS3 offers a huge variety of new ways to create an
impact with your designs.
• CSS 3 too has made its mark with its many features not
only augment the aesthetic appeal but also improve
functionality.
• Style your HTML markup using drop shadows, rounded
corners, multiple backgrounds, animation,
transparency.
• http://css3test.com/
• http://www.css3.info/preview/
19
Intuit Proprietary & Confidential
CSS3
• Borders
– border-radius
– box-shadow
• Background
– background-size
– background-origin
• Text Wrap
– text-shadow
– text-wrap
• @Font-face
• Transforms
– transform
– rotateX() rotateY()
20
Intuit Proprietary & Confidential
CSS3
• Transitions
• Animations
• User Interface
– resize
• Color
– opacity
• Ruby
21
Intuit Proprietary & Confidential
Responsive Design
• http://www.readwriteweb.com/archives/redux_how_the_boston_gl
obe_pulled_off_html5_responsive_d.php
22
Intuit Proprietary & Confidential23
Problem Definition
• Mobile phones have different widths
• Use Case
– Mobile Browsers with different form factor request mobile
page
– On Mobile Web server, User Agent is found
– DRS finds width of phone based on User Agent
– One of many style sheets is chosen(different widths,
Blackberry)
– Mobile page is styled
– Mobile Page presented to end user.
• Optimal?
– Multiple style sheets, more processing, multiple images,
Should we create multiple css files for different
mobile sizes
Intuit Proprietary & Confidential
Current Solution, Device Recognition Software
24
User Agent String
Https Request
Device Width etc
176
css
240
css
320
css
480
css
320
css
Black
berry
DRS Server
W
hich
css?
Mobile web page
DRS(http://tiles.intuit.com/tiles/site/tile/DRS)
Intuit Proprietary & Confidential
Current Solution, Defects
25
Bigger css applied Smaller css applied
Intuit Proprietary & Confidential26
Proposed Solution
• Use Case
– Mobile Browsers, with different widths, request mobile
page
– Flexible Mobile Page presented to end user.
• How?
– HTML5
– CSS3
– Responsive Design
– JQuery Mobile
Intuit Proprietary & Confidential
Proposed Solution, Responsive Design
27
Https Request
Responsive css
One
css!
Mobile web page
Responsive Design
Intuit Proprietary & Confidential28
Responsive Design, What is? pg1
• Flexible Grid
– Flexible Typesetting, font-size in em
– Flexible Grid, width in percentage
– Flexible margins and padding, in percentage
• Flexible Images
• Media Queries (CSS3)
font-size=1.25em; width=80%,
margin=5%,;padding 5%;
Intuit Proprietary & Confidential29
Responsive Design, What is? pg2
• Flexible Grid
• Flexible Images
– Fluid Images, max-width=100%;
– For IE, width=100%;
– For IE, use AlphaImageLoader
– Use overflow:hidden;
• Media Queries (CSS3)
max-width=100%; overflow:hidden;
Intuit Proprietary & Confidential30
Responsive Design, What is? pg3
• Flexible Grid
• Flexible Images
• Media Queries (CSS3 feature)
– media=“screen and (min-width:1024px)”
– CSS3 is not supported?
• Try css-mediaqueries.js
• Try respond.js
media=“screen and (min-width:1024px)”
Intuit Proprietary & Confidential
Summary
31
Intuit Proprietary & Confidential
References
• http://www.html5rocks.com/en/
• http://html5boilerplate.com/
• http://diveintohtml5.info/
• http://caniuse.com/
• http://net.tutsplus.com/tutorials/html-css-
techniques/25-html5-features-tips-and-techniques-
you-must-know/
• http://jsbin.com/
• http://html5demos.com/
32
Intuit Proprietary & Confidential33
Q & A

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (6)

מצגת שלג Crm שלמה
מצגת שלג Crm   שלמהמצגת שלג Crm   שלמה
מצגת שלג Crm שלמה
 
Im alive
Im aliveIm alive
Im alive
 
ヤノマミ
ヤノマミヤノマミ
ヤノマミ
 
Thema 4 les 3
Thema 4 les 3Thema 4 les 3
Thema 4 les 3
 
ヤノマミ
ヤノマミヤノマミ
ヤノマミ
 
Bab 2 koordinasi badan
Bab 2 koordinasi badanBab 2 koordinasi badan
Bab 2 koordinasi badan
 

Ähnlich wie Html5 CSS3

Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy Clarkson
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Chris Love
 
Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Tirthesh Ganatra
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developerbalunasj
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web DevelopmentDaryll Chu
 
Programming iOS in C#
Programming iOS in C#Programming iOS in C#
Programming iOS in C#Frank Krueger
 
There Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignThere Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignChris Love
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5Ron Reiter
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Mediacurrent
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.GaziAhsan
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Frédéric Harper
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인Daum DNA
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3g4gauravagarwal
 

Ähnlich wie Html5 CSS3 (20)

Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Silverlight 5
Silverlight 5Silverlight 5
Silverlight 5
 
Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere Using Responsive Web Design To Make Your Web Work Everywhere
Using Responsive Web Design To Make Your Web Work Everywhere
 
Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)Responsive Web Design (HeadStart TechTalks)
Responsive Web Design (HeadStart TechTalks)
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developer
 
Curtin University Frontend Web Development
Curtin University Frontend Web DevelopmentCurtin University Frontend Web Development
Curtin University Frontend Web Development
 
Html5 more than just html5 v final
Html5  more than just html5 v finalHtml5  more than just html5 v final
Html5 more than just html5 v final
 
Programming iOS in C#
Programming iOS in C#Programming iOS in C#
Programming iOS in C#
 
There Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web DesignThere Is No Mobile: An Introduction To Responsive Web Design
There Is No Mobile: An Introduction To Responsive Web Design
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Let's dig into the Omega Theme!
Let's dig into the Omega Theme!Let's dig into the Omega Theme!
Let's dig into the Omega Theme!
 
Resume
ResumeResume
Resume
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
Devon 2011-f-1 반응형 웹 디자인
Devon 2011-f-1  반응형 웹 디자인Devon 2011-f-1  반응형 웹 디자인
Devon 2011-f-1 반응형 웹 디자인
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
VizEx View HTML5 workshop 2017
VizEx View HTML5 workshop 2017VizEx View HTML5 workshop 2017
VizEx View HTML5 workshop 2017
 
Resume (1)
Resume (1)Resume (1)
Resume (1)
 

Mehr von Puneet Kumar

Mehr von Puneet Kumar (7)

Quick Scala
Quick ScalaQuick Scala
Quick Scala
 
Robotics using EV3 Introduction
Robotics using EV3 Introduction Robotics using EV3 Introduction
Robotics using EV3 Introduction
 
Chess1
Chess1Chess1
Chess1
 
Android accessibility
Android accessibilityAndroid accessibility
Android accessibility
 
Nagios
NagiosNagios
Nagios
 
System adm
System admSystem adm
System adm
 
Bitcoin
BitcoinBitcoin
Bitcoin
 

Kürzlich hochgeladen

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Kürzlich hochgeladen (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

Html5 CSS3

  • 1. HTML5 and CSS3- One UI for All Mobile Phone Form Factors Puneet Kumar, Mobile Team, IFS
  • 2. Intuit Proprietary & Confidential 2 Agenda •HTML5 Crash course(20min) •CSS3 Crash course(10min) •Responsive Design(10 min) – Problem definition – Current Solution – Proposed Solution – How can Responsive Design help!
  • 3. Intuit Proprietary & Confidential Logistics • This presentation is Part 1 of HTML/CSS Workshop at TechForum, Intuit, Feb 21, 2012 • This presentation at Brainstorm: https://intuit.intuitbrainstorm.com/Idea.aspx? id=11398 • Q&A, at the end • Post questions to http://tiles.intuit.com/tiles/site/tile/HTML5# 3
  • 4. Intuit Proprietary & Confidential HTML5, Crash Course 4
  • 5. Intuit Proprietary & Confidential HTML5 Features • New Doctype • Semantic Tags • Forms, new input types • Video, Audio • Canvas • Web Storage • Offline • Web Workers • GeoLocation • Drag and drop 5 Many cool features to explore
  • 6. Intuit Proprietary & Confidential HTML5, New Doctype • <!DOCTYPE html> 6 <!DOCTYPE html> Benefit: Simple. • <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans itional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd">
  • 7. Intuit Proprietary & Confidential HTML5, Semantic tags • <header> • <hgroup> • <article> • <section> • <aside> • <footer> • <nav> 7 Better than <div> Benefit: Human readable HTML pages.
  • 8. Intuit Proprietary & Confidential8 HTML4 HTML5 HTML5, Semantic tags #.header{…} #.navigator{…} #.sidebar{…} CSS: CSS: header{…} nav {…} aside{…} Semantic
  • 9. Intuit Proprietary & Confidential HTML5, Forms, new input types • <input type=email> • <input type=url> • <input type=date> • <input type=time> • <input type=datetime> • <input type=month> • <input type=week> • <input type=number> • <input type=tel> • <input type=color> • <input pattern=“[0-9][A-Z]{3}”> 9 <input type= > Benefit: Built in validation.
  • 10. Intuit Proprietary & Confidential HTML5, Forms, new input types • <form action="" method="get"> <label for=”tel">type:tel</label> <input id=”tel" name=”tel" type=”tel" /> <button type="submit"> Submit Form </button> </form> • <ul contenteditable=“true”> <li>First</li> </ul> 10 <input type=“tel”> will show number pad
  • 11. Intuit Proprietary & Confidential HTML5, <video> <audio> •video controls preload> <source src="cohagenPhoneCall.ogv" type="video/ogg; cod ecs='vorbis, theora'" /> <source src="cohagenPhoneCall.mp4" type="video/mp4; 'c odecs='avc1.42E01E, mp4a.40.2'" /> <p> Your browser is old. <a href="cohagenPhoneCall.mp4" >Download this video instead.</a> </p> </video> 11 <video> <audio> Benefit: Flash killer?
  • 12. Intuit Proprietary & Confidential HTML5, Canvas • <canvas></canvas> • Dynamic rendering of 2D shapes and bitmap images. 12 <canvas> Benefit: 2D Games!
  • 13. Intuit Proprietary & Confidential HTML5, Canvas • <canvas id=“ex” width=“200” height=“200”> • var ctx = document.getElementById(‘ex’).getContext(‘2d’); ctx.fillRect(10,20,50,50); //Paints rectangle (x,y,w,h) ctx.strokeStyle=‘rgb(0,255,0)’; ctx.lineWidth= 5; ctx.strokeRect(9,19,52,52); • gradient = ctx.createLinearGradient(0,0,0,canvas.height); gradient.addColorStop(0,”#fff”); gradient.addColorStop(1,”000”); ctx.fillStyle = gradient; • https://developer.mozilla.org/en/Canvas_tutorial/Basic_usage 13
  • 14. Intuit Proprietary & Confidential HTML5, Web Storage • Web Storage- key value – localStorage – sessionStorage – .setItem(‘data’, 12); – .getItem(‘data’); – .removeItem(‘data’) – .clear() – sessionStorage.length – sessionStorage.key(i) – Trap: Stored as Strings! 14 Better than cookies Benefit: Cookies on steroids
  • 15. Intuit Proprietary & Confidential HTML5, Web SQL database • Web SQL Storage- SQL database • var db; if(window.openDatabase){ db = openDatabase(‘myDB’, ‘1.0’, ‘test db’, 2 *1024 *1024); db.transaction(function (tx) { tx.executeSql(‘CREATE TABLE IF NOT EXISTS test(id, date, testdata)’, [], function(){ )};//executeSql )};//db.transaction } 15 SQL syntax Benefit: Database in Browser!
  • 16. Intuit Proprietary & Confidential HTML5, Offline • Offline • Application works even after network connectivity is lost. • Manifest file needs to know what to cache. • <html manifest=“/time.manifest”> • Apache mimes.types: – text/cache-manifest manifest 16 No network, no problem
  • 17. Intuit Proprietary & Confidential HTML5, Web Workers • Web workers • var worker=new Worker(“myworker.js”); worker.postMessage(“hello”); worker.onMessage = function(event){ alert(‘The worker sent ’ + event.data); }; //In myworker.js: onmessage = function(event){ if(event.data == “hello”){ postMessage(“hello main”) }else{ postMessage(“Busy right now!”); } } 17 multi threading Benefit: Responsive pages
  • 18. Intuit Proprietary & Confidential HTML5, Geolocation .Found You! •if(navigator.geolocation){ – navigator.geolocation.getCurrentPosition(function(position){ var coord = position.coords; showMap(coords.latitude, coords.longitude, coords.accuracy); – }); } •.watchPosition(); •.clearPosition(); 18 geolocation
  • 19. Intuit Proprietary & Confidential CSS3 • CSS3 offers a huge variety of new ways to create an impact with your designs. • CSS 3 too has made its mark with its many features not only augment the aesthetic appeal but also improve functionality. • Style your HTML markup using drop shadows, rounded corners, multiple backgrounds, animation, transparency. • http://css3test.com/ • http://www.css3.info/preview/ 19
  • 20. Intuit Proprietary & Confidential CSS3 • Borders – border-radius – box-shadow • Background – background-size – background-origin • Text Wrap – text-shadow – text-wrap • @Font-face • Transforms – transform – rotateX() rotateY() 20
  • 21. Intuit Proprietary & Confidential CSS3 • Transitions • Animations • User Interface – resize • Color – opacity • Ruby 21
  • 22. Intuit Proprietary & Confidential Responsive Design • http://www.readwriteweb.com/archives/redux_how_the_boston_gl obe_pulled_off_html5_responsive_d.php 22
  • 23. Intuit Proprietary & Confidential23 Problem Definition • Mobile phones have different widths • Use Case – Mobile Browsers with different form factor request mobile page – On Mobile Web server, User Agent is found – DRS finds width of phone based on User Agent – One of many style sheets is chosen(different widths, Blackberry) – Mobile page is styled – Mobile Page presented to end user. • Optimal? – Multiple style sheets, more processing, multiple images, Should we create multiple css files for different mobile sizes
  • 24. Intuit Proprietary & Confidential Current Solution, Device Recognition Software 24 User Agent String Https Request Device Width etc 176 css 240 css 320 css 480 css 320 css Black berry DRS Server W hich css? Mobile web page DRS(http://tiles.intuit.com/tiles/site/tile/DRS)
  • 25. Intuit Proprietary & Confidential Current Solution, Defects 25 Bigger css applied Smaller css applied
  • 26. Intuit Proprietary & Confidential26 Proposed Solution • Use Case – Mobile Browsers, with different widths, request mobile page – Flexible Mobile Page presented to end user. • How? – HTML5 – CSS3 – Responsive Design – JQuery Mobile
  • 27. Intuit Proprietary & Confidential Proposed Solution, Responsive Design 27 Https Request Responsive css One css! Mobile web page Responsive Design
  • 28. Intuit Proprietary & Confidential28 Responsive Design, What is? pg1 • Flexible Grid – Flexible Typesetting, font-size in em – Flexible Grid, width in percentage – Flexible margins and padding, in percentage • Flexible Images • Media Queries (CSS3) font-size=1.25em; width=80%, margin=5%,;padding 5%;
  • 29. Intuit Proprietary & Confidential29 Responsive Design, What is? pg2 • Flexible Grid • Flexible Images – Fluid Images, max-width=100%; – For IE, width=100%; – For IE, use AlphaImageLoader – Use overflow:hidden; • Media Queries (CSS3) max-width=100%; overflow:hidden;
  • 30. Intuit Proprietary & Confidential30 Responsive Design, What is? pg3 • Flexible Grid • Flexible Images • Media Queries (CSS3 feature) – media=“screen and (min-width:1024px)” – CSS3 is not supported? • Try css-mediaqueries.js • Try respond.js media=“screen and (min-width:1024px)”
  • 31. Intuit Proprietary & Confidential Summary 31
  • 32. Intuit Proprietary & Confidential References • http://www.html5rocks.com/en/ • http://html5boilerplate.com/ • http://diveintohtml5.info/ • http://caniuse.com/ • http://net.tutsplus.com/tutorials/html-css- techniques/25-html5-features-tips-and-techniques- you-must-know/ • http://jsbin.com/ • http://html5demos.com/ 32
  • 33. Intuit Proprietary & Confidential33 Q & A

Hinweis der Redaktion

  1. A browser extension might allow a user to jump straight to the nav with a single keystroke. It can do this because it looks for nav rather than having to employ heuristics to find a div with an id or class that would suggest it’s being used as navigation. A restaurant site with a div called “menu” might be a list of foods rather than other pages. A crawler might dynamically assemble articles on a timeline.
  2. http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#the-canvas-element
  3. http://tiles.intuit.com/tiles/site/tile/DRS