際際滷

際際滷Share a Scribd company logo
HTML5&CSS3Buildingamobilewebsite
ByMarioHernandez
CourseAgenda
1. HTML5
2. CSS3
3. Feature Supportand Polyfills
4. Resources
AboutMe
I am Web Designer and Themer forDrupal Mediacurrent
Experience
Worked for the FederalGovernmentas lead Front-end
Developer
NoticebleProjects
1.
2.
3.
4.
5.
6.
7.
Teens ExploringTechnology
FederalCourtin Los Angeles
Dallas Cowboys
New England Patriots
San Diego Chargers
Harvard University
Habitatfor Humanity
PublicSpeaker
I conductcommunity-driven and private workshops
DrupalCamp Los Angeles
CodeCamp Los Angeles &San Diego
San Diego .NetUser Group
Meetups througoutLos Angeles
HTML5
HyperTextMarkupLanguage
Progressive Enhancements and GracefulDegradation
Its official!
Block LevelElements vs. Inline LevelElements
Forms and Form Elements
Audio &Video
Picture
ExtendingSemantics &Accessibility
Performance and Optimization
CSS3Syntax
AddingCSS to apage
Floats
Positioning
Box Model
Web fonts
MediaQueries
Preprocessors -Introduction to Sass
Toolsand
PollyfillsModernizr
HTML5Shiv
Respond.js
Resources1.
2.
3.
4.
CodePen
Can I Use
CSS3Please.com
HTML5Doctor.com
赫姻温界艶韓顎鉛油禽艶乙姻温糸温岳庄看稼
永姻看乙姻艶壊壊庄厩艶油掘稼鞄温稼界艶馨艶稼岳
ExampleofGraceful
Degradation
.selector{
background-color:rgba(0,0,0,.5);
}
.lt-ie9.selector{
background-color:#999;
}
ExampleofProgressive
Enhacement
.selector{
background:url(/slideshow/html5-css3-43410756/43410756/images/image.png)00no-repeat;
}
.lt-ie9.selector{
background:url(/slideshow/html5-css3-43410756/43410756/images/image.gif)00no-repeat;
}
It'sOfficial!!!HTML5declaredcompleteonOctober28,
2014
BlockLevelElements
Vs.
InlineLevelElements
Demo
Forms&FormElements
Demo
Audio&Video
Demo
Picture
How<picture>works
<picture>
<sourcesrcset="mobile.png">
<sourcemedia="(min-width:480px)"srcset="tablet.png">
<sourcemedia="(min-width:960px)"srcset="desktop.png">
<imgsrc=/slideshow/html5-css3-43410756/43410756/"default.png"alt="Alternatetextisaddedinimgtag">
</picture>
View article for description
Another greatarticle
BrowserSupport
Can I Use
ExtendingSemantics&
Accessibility
Getinfo from article
PerformanceandOptimization
Getinfo from article
遺皆皆3遺温壊界温糸庄稼乙油皆岳霞鉛艶油皆鞄艶艶岳壊
Agenda
Syntax and code format
AddingCSS to apage
Floats
Positions
z-index
Box Model
Web fonts
MediaQueries
Flexbox
Transitions
Preprocessors -Introduction to Sass
Syntax
selector{property:value;property:value;}
Syntax
body{background:white;color:blue;}
Syntax
body{
background:white;
color:blue;
}
AddingCSStoapage
Inline
<h1style="color:red;font-size:24px;">HelloWorld!</h1>
AddingCSStoapage
InternalStylesheet
<head>
<style>
</style>
</head>
h1{
color:red;
font-size:24px;
}
AddingCSStoapage
ExternalStylesheet
<linkrel="stylesheet"href="css/styles.css">
Floats
Demo
Positioning
皆岳温岳庄界油永看壊庄岳庄看稼庄稼乙
FixedPositioning
An elementwith fixed position is positioned relative to the
browser window. Itwillnotmove even if the window is scrolled:
h1{
position:fixed;
top:30px;
right:5px;
}
RelativePositioning
Arelative positioned elementis positioned relative to its normal
position.
h2{
position:relative;
left:-20px;
}
h2{
position:relative;
right:20px;
}
RelativePositioning
The contentof relativelypositioned elements can be moved and
overlap other elements, butthe reserved space for the elementis
stillpreserved in the normalflow.
Demo
AbsolutePositioning
An absolute position elementis positioned relative to the first
parentelementthathas aposition other than static. If no such
elementis found, the containingblock is <html>:
h2{
position:absolute;
left:100px;
top:150px;
}
AbsolutePositioning
Absolutelypositioned elements are removed from the normal
flow. The documentand other elements behave like the
absolutelypositioned elementdoes notexist. Absolutely
positioned elements can overlap other elements.
OverlappingElements
When elements are positioned outside the normalflow, theycan
overlap other elements.
The z-index propertyspecifies the stack order of an element
(which elementshould be placed in frontof, or behind, the
others).
An elementcan have apositive or negative stack order:
img{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}
An elementwith greater stack order is always in frontof an
elementwith alower stack order.
If two positioned elements overlap withoutaz-index specified,
the elementpositioned lastin the HTML code willbe shown on
top.
BoxModel
The CSS box modelis essentiallyabox thatwraps around HTML
elements, and itconsists of: margins, borders, padding, and the
actualcontent.
Demo
&
Code Example
安艶恢油酷看稼岳壊
MediaQueries
@mediascreenand(max-width:300px){
body{
background-color:lightblue;
}
}
Sass(SyntacticallyAwesomeStyleSheets)
IntroductiontoPreprocessors
WhatisSass?
Sass is an extension of CSS thatadds power and elegance to the
basic language. Itallows you to use variables, nested rules,
mixins, inline imports, and more, allwith afullyCSS-compatible
syntax.
FeaturesofSass
FullyCSS3-compatible
Language extensions such as variables, nesting, and mixins
Manyusefulfunctions for manipulating
Well-formatted, customizable output
For more visitsass-lang.com
Let'sseeSassinaction
Live demo
GettingStartedwithSass
InstallingSass
Mac
SassrequiresRuby
geminstallsass
Windows
InstallRubyInstaller first
geminstallsass
Go
ConfirmSassisupandrunning
sass-v
Compass
Theawesomesauce!
WhatisCompass?
OpenSourceCSSAuthoringFramework
Demo
InstallingCompass
geminstallcompass
Download slides:
Download slides source code:
Anyquestions?about.me/mario.hernandez
@Designsdrive
slideshare.net/marequi
github.com/mariohernandez/html5-css3
BasicMarkup
<!doctypehtml>
<htmllang="en">
<head>
<metacharset="utf-8">
<title>HTML5andCSS3</title>
<linkrel="stylesheet"href="css/styles.css?v=1.0">
<head>
<body>
Contentgoeshere...
<scriptsrc=/slideshow/html5-css3-43410756/43410756/"js/scripts.js"></script>
</body>
</html>

More Related Content

HTML5 and CSS3