SlideShare a Scribd company logo
Articles from Jinal Desai .NET
Exam 70-480 CSS3
2013-01-19 14:01:28 Jinal Desai

The article is targeted for Microsoft Certification exam 70-480, the CSS3 described
in the article is limited to the exam point of view only.

Selectors
Element Selector: li { color: red; }
Class Selector: .fancyClass { color: red; }
Universal Selector: *.fancyClass { color: red; }
Combination of element selector and class selector to limit the scope: div
.fancyClass { color:red; }
Identifier Selector: #contactForm { color:blude; }
Attribute Selector []:
 *[data-author] { color:red; }    <div data-author></div>
*[data-author=”Dan Brown”]{ } <div data-author="Dan Brown"></div>
*[data-author*=Brown]{ }
                                   <div data-author="Dan Brown"></div>
//*=contains
*[data-author^=Dan]{ }
                                   <div data-author="Dan Brown"></div>
//^=starts with
*[data-author$=Brown]{ }
                                   <div data-author="Dan Brown"></div>
//$=ends with

Selector Chaining
table, ul { color:red; } //all tabl and ul elements
div table, div ul { color:red; } //all table and ul elements which are inside div

Pseudo Element Selectors
p::first-letter { color:red; } //Apply style to first character of every paragraph
p::first-line { color:red; } //Apply style to first line of every paragraph
p:hover { color:red; } //Apply style when hover on every paragraph

Combinators
Combinators are simple selectors in your css, which when combined it targets to
group or individual elements.
#Div1 div { } //All the divs inside div with id Div1
#Div1 p { } //All the paragraphs inside div with id Div1
#Div1 > p { } //All the immediate paragraphs inside the div with id Div1
#Div1 ~ p { } //All the sibling paragraphs to the div with id Div1
ul + div { } //Immediate succeeding div siblings of all ul

Pseudo Classes
li:first-child { color:red; }
li:nth-child(1) { color:red; } //Index is 0 based not 1 based, so it fetches second child
element
li:nth-child(2n+3) { } //3rd child element
li:nth-of-type(2n+3) { }
//Following is reference for which element will be covered
//in applying styles based on particular expression, ie.
//for 2n+1 expression it will apply style to elements 1,3,5,7,9,11 (all odd elements)

n 2n+1 4n+1 4n+4 4n 5n-2 -n+3
01        1      4      -   -     3
13        5      8      4 3       2
25        9      12     8 8       1
37        13     16     12 13     -
49        17     20     16 18     -
5 11      21     24     20 23     -

li:nth-of-type(odd) { } //applies style to all odd elements
li:nth-of-type(even) { } //applies style to all even elements
li:nth-last-child(-n+4) { } //applies style to the last four list items in any list,
//be it ordered or unordered
li:nth-last-of-type(2) { } //applies style to the elements that are followed by
//n-1siblings with the same element name in the document tree

Color Properties
There are around 300 css properties to apply.
{ color:red; } //175 named colors are there
{ color:#0000FF; }
{ color:#00F; }
{ color:rgb(0,0,255); } //red, green and blue
{ color:rgba(0,255,0,0.5); } //a=opacity
{ color:hsl(0,50%,50%); } //hue, saturation and lightness
{ color:hsla(0,0,50%,0.7); } //a=opacity
{ opacity:0.5; } //fade color upto 50%

Basic Text Properties
text-decoration : overline | underline | line-through
text-transform : none | lowercase | uppercase | capitalize
text-shadow : 2px 2px gray //2px down, 2px righ and color=gray
text-shadow : 2px 2px 2px gray //2px down, 2px right, 2px blur and color=gray
text-shadow : 0 0 10px red //0 down and 0 right means not going in specific direction
//shadow will go in every direction
text-shadow : 2px 2px 2px red, 4px 4px 4px green, n number
//shadow can have multiple parameters separated by comma
//to apply multiple shadow
text-shadow : -2px 2px -2px red, 4px -4px -4px green
//-sign for going in reverse direction
Font Properties
font-style : normal | italique | oblique
font-variant : normal | small-caps
font-weight : normal | bold | bolder | light | lighter | #
//# can be any number between 100-900 where 100 is lighter and 900 bolder
font-size : {length} //1px, 1pt, 1cm, 0.5in
line-height : {length} //for making space between the lines
font-family : {fontname}

New way of defining font faces
@font-face {
font-family : “Arial123”;
src : url(“/fonts/Arial.woff”) format(woff);
}
//to use it
.arialFont {
font-family : Arial123;
}

How to define Columns?
{ columns : 8; }
{ columns : 100px 200px 100px 200px; }

Box Properties
{ margin : 10px; } //margin 10px in all directions
{ margin-left : 10px; }
{ margin-right : 10px; }
{ margin-top : 10px; }
{ margin-bottom : 10px; }

{ padding : 20px; } //padding 20px in all directions
{ padding-left : 20px; }
{ padding-right : 20px; }
{ padding-top : 20px; }
{ padding-bottom : 20px; }

{ border : 2px solid; }
{ border : 5px dotted red; }
{ border-left : 1px solid green; }

{ box-sizing : border-box; } //Includes border in total width defined for the content
{ -moz-box-sizing : border-box; } //For firefox
{ -webkit-box-sizing : border-box; } //For safari
{ box-sizing : content-box; } //Default behavior of width and height
{ box-sizing : inherit; }

Visibility
{ display : inline | block | inline-block | table | none }
{ visibility : visible | hidden }
{ white-space : normal | pre | nowrap | pre-wrap | pre-line | inherit }
{ overflow : visible | hidden | scroll | auto }
{ overflow-x : visible; }
{ overflow-y : hidden; }
{ box-shadow : 10px 10px 5px #888888; }
{ border-radius : 5px; } //for rounded border

Gradients
{ background : linear-gradient(black, white); } //standard
{ background : -moz-linear-gradient(black, white); } //Firefox 3.6+
{ background : -webkit-linear-gradient(black, white); } //Safari 5.1+, Chrome 10+
{ background : -o-linear-gradient(black, white); } //opera 11.10

background-image: -webkit-radial-gradient(center center, circle contain, black 0%,
blue 25%, green 40%, red 60%, purple 80%, white 100%); /* New WebKit syntax */
background-image: -moz-radial-gradient(center center, circle contain, black 0%,
blue 25%, green 40%, red 60%, purple 80%, white 100%); //Firefox 3.6+
background-image: -ms-radial-gradient(center center, circle contain, black 0%, blue
25%, green 40%, red 60%, purple 80%, white 100%); /* IE10+ */
background-image: -o-radial-gradient(center center, circle contain, black 0%, blue
25%, green 40%, red 60%, purple 80%, white 100%); /* Opera (13?) */

Positioning
#div1 {
position:absolute;
top : 25px;
left : 50px;
z-index : 0;
}
#div2 {
position:relative;
top:25px;
left:50px;
z-index:1;
}
.centered {
display : table-cell;
min-height : 200px;
min-width : 200px;
text-align : center;
vertical-align : middle;
border:1px solid #ff4444;
}

Flexbox
It is giving control over it’s child elements.
{ display : -ms-flexbox;
-ms-flex-pack : distribute; //manage space between child flex elements
}
{ display : -ms-flexbox;
-ms-flex: 1 0 auto; //1=relative amount of flex, 0=size
-ms-flex: 2 0 auto; //2=double the size than previous one
}
{ display : -ms-flexbox;
-ms-flex-wrap : wrap;
}
#flexbox > div {
background-color : gray; }
#flexbox > div : nth-child(7) {
background-color : red; }

Grid
Grid Features
-Power of tables but implemented in CSS
-absolute rows and columns
-functional rows and columns
-spanning
-alignment
{ display: -ms-grid;
-ms-grid-columns:250px 250px;
-ms-grid-rows:250px 250px;
}
.grid > div > div : nth-child(2) {
-ms-grid-columns:2;
-ms-grid-rows:1;
}
.grid > div > div:nth-child(2) {
-ms-grid-row-span:2;
-ms-grid-column-span:3;
}
{ height:600px;
-ms-grid-rows:100px 1fr 2fr 100px;
width:400px;
-ms-grid-columns:100px 1fr 2fr;
}
We can also cascade flexbox inside flexbox or grid inside grid.

Transform, Transition and Animation
.grid div h2 {
-ms-grid-column-align: center;
-ms-grid-row-align: center;
}
.grid div:nth-of-type(2) h2 {
transform: scale(0.5);
}
{ transform: scale(2) translate (50px 50px) rotate(10deg); }
// 50px=down and 50px=right
.someClass {
transition:all 1s;
}

.someClass {
border-radius:50%; }
.animations .pagetitle {
position: relative;
animation:drop-in 1s forwards;
}
@keyframes get-angry {
0% { box-shadow:0 0 1px 1px #000000; }
60% { color:#991100; }
70% { color:#FF0000; }
80% { color:#22DD22; }
100% { color:#100000; }
}
.animate-get-angry {
animation:get-angry 5s forwards; }
@keyframes drop-in {
0% { top: -100px; }
100% { top: 0px; }
}
Animation can also be triggered from javascript.

References
Impressive Webs
w3 schools
Microsoft Virtual Academy

More Related Content

Viewers also liked

The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11
Sebastian Kurfürst
 
Auto Tagger for SharePoint - Rule-based Content Classification
Auto Tagger for SharePoint - Rule-based Content ClassificationAuto Tagger for SharePoint - Rule-based Content Classification
Auto Tagger for SharePoint - Rule-based Content Classification
Frank Daske
 
T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision
die.agilen GmbH
 
T3CON11 Building a service oriented application with FLOW3
T3CON11 Building a service oriented application with FLOW3T3CON11 Building a service oriented application with FLOW3
T3CON11 Building a service oriented application with FLOW3
Christopher Hlubek
 
Save time by using SASS/SCSS
Save time by using SASS/SCSSSave time by using SASS/SCSS
Save time by using SASS/SCSS
Berit Hlubek
 
Getting Involved with TYPO3
Getting Involved with TYPO3Getting Involved with TYPO3
Getting Involved with TYPO3
Berit Hlubek
 

Viewers also liked (6)

The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11The Current State of TYPO3 Phoenix -- T3CON11
The Current State of TYPO3 Phoenix -- T3CON11
 
Auto Tagger for SharePoint - Rule-based Content Classification
Auto Tagger for SharePoint - Rule-based Content ClassificationAuto Tagger for SharePoint - Rule-based Content Classification
Auto Tagger for SharePoint - Rule-based Content Classification
 
T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision T3CON11 - Extreme Fluid - Patrick Lobacher typovision
T3CON11 - Extreme Fluid - Patrick Lobacher typovision
 
T3CON11 Building a service oriented application with FLOW3
T3CON11 Building a service oriented application with FLOW3T3CON11 Building a service oriented application with FLOW3
T3CON11 Building a service oriented application with FLOW3
 
Save time by using SASS/SCSS
Save time by using SASS/SCSSSave time by using SASS/SCSS
Save time by using SASS/SCSS
 
Getting Involved with TYPO3
Getting Involved with TYPO3Getting Involved with TYPO3
Getting Involved with TYPO3
 

Similar to Exam 70 480 CSS3 at Jinal Desai .NET

Software programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesDinu Suman
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsKaelig Deloumeau-Prigent
 
CSS for Developers
CSS for DevelopersCSS for Developers
CSS for Developers
Nascenia IT
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
Mario Noble
 
Compass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS DeveloperCompass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS Developer
Wynn Netherland
 
Sass - Making CSS fun again.
Sass - Making CSS fun again.Sass - Making CSS fun again.
Sass - Making CSS fun again.
Gabriel Neutzling
 
Chapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsChapter 13: Colors and Backgrounds
Chapter 13: Colors and Backgrounds
Steve Guinan
 
Oocss & progressive css3 selectors
Oocss & progressive css3 selectorsOocss & progressive css3 selectors
Oocss & progressive css3 selectors
daniel_sternlicht
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3 Wynn Netherland
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
Rob Friesel
 
CSS3 Refresher
CSS3 RefresherCSS3 Refresher
CSS3 Refresher
Ivano Malavolta
 
Sass Essentials
Sass EssentialsSass Essentials
Sass Essentials
romiguelangel
 
Less css framework
Less css frameworkLess css framework
Less css framework
Manisha Bano
 
basics of css
basics of cssbasics of css
basics of css
Priya Goyal
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Adam Darowski
 
CSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and ConsCSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and Cons
Sanjoy Kr. Paul
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
Idan Gazit
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
ThemePartner
 

Similar to Exam 70 480 CSS3 at Jinal Desai .NET (20)

Software programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS filesSoftware programming tools for creating/managing CSS files
Software programming tools for creating/managing CSS files
 
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive NewsMobile-first OOCSS, Sass & Compass at BBC Responsive News
Mobile-first OOCSS, Sass & Compass at BBC Responsive News
 
CSS for Developers
CSS for DevelopersCSS for Developers
CSS for Developers
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
Preprocessor presentation
Preprocessor presentationPreprocessor presentation
Preprocessor presentation
 
Compass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS DeveloperCompass, Sass, and the Enlightened CSS Developer
Compass, Sass, and the Enlightened CSS Developer
 
Sass - Making CSS fun again.
Sass - Making CSS fun again.Sass - Making CSS fun again.
Sass - Making CSS fun again.
 
Chapter 13: Colors and Backgrounds
Chapter 13: Colors and BackgroundsChapter 13: Colors and Backgrounds
Chapter 13: Colors and Backgrounds
 
Oocss & progressive css3 selectors
Oocss & progressive css3 selectorsOocss & progressive css3 selectors
Oocss & progressive css3 selectors
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 
Wrangling the CSS Beast with Sass
Wrangling the CSS Beast  with SassWrangling the CSS Beast  with Sass
Wrangling the CSS Beast with Sass
 
Less css
Less cssLess css
Less css
 
CSS3 Refresher
CSS3 RefresherCSS3 Refresher
CSS3 Refresher
 
Sass Essentials
Sass EssentialsSass Essentials
Sass Essentials
 
Less css framework
Less css frameworkLess css framework
Less css framework
 
basics of css
basics of cssbasics of css
basics of css
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
 
CSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and ConsCSS Less framework overview, Pros and Cons
CSS Less framework overview, Pros and Cons
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 

More from jinaldesailive

Wcf tutorials
Wcf tutorialsWcf tutorials
Wcf tutorials
jinaldesailive
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
jinaldesailive
 
State Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVCState Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVC
jinaldesailive
 
OOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NETOOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NET
jinaldesailive
 
Mvc interview questions – deep dive jinal desai
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desai
jinaldesailive
 
Software design principles - jinal desai
Software design principles - jinal desaiSoftware design principles - jinal desai
Software design principles - jinal desai
jinaldesailive
 

More from jinaldesailive (6)

Wcf tutorials
Wcf tutorialsWcf tutorials
Wcf tutorials
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
State Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVCState Management In ASP.NET And ASP.NET MVC
State Management In ASP.NET And ASP.NET MVC
 
OOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NETOOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NET
 
Mvc interview questions – deep dive jinal desai
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desai
 
Software design principles - jinal desai
Software design principles - jinal desaiSoftware design principles - jinal desai
Software design principles - jinal desai
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Exam 70 480 CSS3 at Jinal Desai .NET

  • 1. Articles from Jinal Desai .NET Exam 70-480 CSS3 2013-01-19 14:01:28 Jinal Desai The article is targeted for Microsoft Certification exam 70-480, the CSS3 described in the article is limited to the exam point of view only. Selectors Element Selector: li { color: red; } Class Selector: .fancyClass { color: red; } Universal Selector: *.fancyClass { color: red; } Combination of element selector and class selector to limit the scope: div .fancyClass { color:red; } Identifier Selector: #contactForm { color:blude; } Attribute Selector []: *[data-author] { color:red; } <div data-author></div> *[data-author=”Dan Brown”]{ } <div data-author="Dan Brown"></div> *[data-author*=Brown]{ } <div data-author="Dan Brown"></div> //*=contains *[data-author^=Dan]{ } <div data-author="Dan Brown"></div> //^=starts with *[data-author$=Brown]{ } <div data-author="Dan Brown"></div> //$=ends with Selector Chaining table, ul { color:red; } //all tabl and ul elements div table, div ul { color:red; } //all table and ul elements which are inside div Pseudo Element Selectors p::first-letter { color:red; } //Apply style to first character of every paragraph p::first-line { color:red; } //Apply style to first line of every paragraph p:hover { color:red; } //Apply style when hover on every paragraph Combinators Combinators are simple selectors in your css, which when combined it targets to group or individual elements. #Div1 div { } //All the divs inside div with id Div1 #Div1 p { } //All the paragraphs inside div with id Div1 #Div1 > p { } //All the immediate paragraphs inside the div with id Div1 #Div1 ~ p { } //All the sibling paragraphs to the div with id Div1 ul + div { } //Immediate succeeding div siblings of all ul Pseudo Classes li:first-child { color:red; }
  • 2. li:nth-child(1) { color:red; } //Index is 0 based not 1 based, so it fetches second child element li:nth-child(2n+3) { } //3rd child element li:nth-of-type(2n+3) { } //Following is reference for which element will be covered //in applying styles based on particular expression, ie. //for 2n+1 expression it will apply style to elements 1,3,5,7,9,11 (all odd elements) n 2n+1 4n+1 4n+4 4n 5n-2 -n+3 01 1 4 - - 3 13 5 8 4 3 2 25 9 12 8 8 1 37 13 16 12 13 - 49 17 20 16 18 - 5 11 21 24 20 23 - li:nth-of-type(odd) { } //applies style to all odd elements li:nth-of-type(even) { } //applies style to all even elements li:nth-last-child(-n+4) { } //applies style to the last four list items in any list, //be it ordered or unordered li:nth-last-of-type(2) { } //applies style to the elements that are followed by //n-1siblings with the same element name in the document tree Color Properties There are around 300 css properties to apply. { color:red; } //175 named colors are there { color:#0000FF; } { color:#00F; } { color:rgb(0,0,255); } //red, green and blue { color:rgba(0,255,0,0.5); } //a=opacity { color:hsl(0,50%,50%); } //hue, saturation and lightness { color:hsla(0,0,50%,0.7); } //a=opacity { opacity:0.5; } //fade color upto 50% Basic Text Properties text-decoration : overline | underline | line-through text-transform : none | lowercase | uppercase | capitalize text-shadow : 2px 2px gray //2px down, 2px righ and color=gray text-shadow : 2px 2px 2px gray //2px down, 2px right, 2px blur and color=gray text-shadow : 0 0 10px red //0 down and 0 right means not going in specific direction //shadow will go in every direction text-shadow : 2px 2px 2px red, 4px 4px 4px green, n number //shadow can have multiple parameters separated by comma //to apply multiple shadow text-shadow : -2px 2px -2px red, 4px -4px -4px green //-sign for going in reverse direction
  • 3. Font Properties font-style : normal | italique | oblique font-variant : normal | small-caps font-weight : normal | bold | bolder | light | lighter | # //# can be any number between 100-900 where 100 is lighter and 900 bolder font-size : {length} //1px, 1pt, 1cm, 0.5in line-height : {length} //for making space between the lines font-family : {fontname} New way of defining font faces @font-face { font-family : “Arial123”; src : url(“/fonts/Arial.woff”) format(woff); } //to use it .arialFont { font-family : Arial123; } How to define Columns? { columns : 8; } { columns : 100px 200px 100px 200px; } Box Properties { margin : 10px; } //margin 10px in all directions { margin-left : 10px; } { margin-right : 10px; } { margin-top : 10px; } { margin-bottom : 10px; } { padding : 20px; } //padding 20px in all directions { padding-left : 20px; } { padding-right : 20px; } { padding-top : 20px; } { padding-bottom : 20px; } { border : 2px solid; } { border : 5px dotted red; } { border-left : 1px solid green; } { box-sizing : border-box; } //Includes border in total width defined for the content { -moz-box-sizing : border-box; } //For firefox { -webkit-box-sizing : border-box; } //For safari { box-sizing : content-box; } //Default behavior of width and height { box-sizing : inherit; } Visibility { display : inline | block | inline-block | table | none }
  • 4. { visibility : visible | hidden } { white-space : normal | pre | nowrap | pre-wrap | pre-line | inherit } { overflow : visible | hidden | scroll | auto } { overflow-x : visible; } { overflow-y : hidden; } { box-shadow : 10px 10px 5px #888888; } { border-radius : 5px; } //for rounded border Gradients { background : linear-gradient(black, white); } //standard { background : -moz-linear-gradient(black, white); } //Firefox 3.6+ { background : -webkit-linear-gradient(black, white); } //Safari 5.1+, Chrome 10+ { background : -o-linear-gradient(black, white); } //opera 11.10 background-image: -webkit-radial-gradient(center center, circle contain, black 0%, blue 25%, green 40%, red 60%, purple 80%, white 100%); /* New WebKit syntax */ background-image: -moz-radial-gradient(center center, circle contain, black 0%, blue 25%, green 40%, red 60%, purple 80%, white 100%); //Firefox 3.6+ background-image: -ms-radial-gradient(center center, circle contain, black 0%, blue 25%, green 40%, red 60%, purple 80%, white 100%); /* IE10+ */ background-image: -o-radial-gradient(center center, circle contain, black 0%, blue 25%, green 40%, red 60%, purple 80%, white 100%); /* Opera (13?) */ Positioning #div1 { position:absolute; top : 25px; left : 50px; z-index : 0; } #div2 { position:relative; top:25px; left:50px; z-index:1; } .centered { display : table-cell; min-height : 200px; min-width : 200px; text-align : center; vertical-align : middle; border:1px solid #ff4444; } Flexbox It is giving control over it’s child elements. { display : -ms-flexbox;
  • 5. -ms-flex-pack : distribute; //manage space between child flex elements } { display : -ms-flexbox; -ms-flex: 1 0 auto; //1=relative amount of flex, 0=size -ms-flex: 2 0 auto; //2=double the size than previous one } { display : -ms-flexbox; -ms-flex-wrap : wrap; } #flexbox > div { background-color : gray; } #flexbox > div : nth-child(7) { background-color : red; } Grid Grid Features -Power of tables but implemented in CSS -absolute rows and columns -functional rows and columns -spanning -alignment { display: -ms-grid; -ms-grid-columns:250px 250px; -ms-grid-rows:250px 250px; } .grid > div > div : nth-child(2) { -ms-grid-columns:2; -ms-grid-rows:1; } .grid > div > div:nth-child(2) { -ms-grid-row-span:2; -ms-grid-column-span:3; } { height:600px; -ms-grid-rows:100px 1fr 2fr 100px; width:400px; -ms-grid-columns:100px 1fr 2fr; } We can also cascade flexbox inside flexbox or grid inside grid. Transform, Transition and Animation .grid div h2 { -ms-grid-column-align: center; -ms-grid-row-align: center; } .grid div:nth-of-type(2) h2 { transform: scale(0.5); }
  • 6. { transform: scale(2) translate (50px 50px) rotate(10deg); } // 50px=down and 50px=right .someClass { transition:all 1s; } .someClass { border-radius:50%; } .animations .pagetitle { position: relative; animation:drop-in 1s forwards; } @keyframes get-angry { 0% { box-shadow:0 0 1px 1px #000000; } 60% { color:#991100; } 70% { color:#FF0000; } 80% { color:#22DD22; } 100% { color:#100000; } } .animate-get-angry { animation:get-angry 5s forwards; } @keyframes drop-in { 0% { top: -100px; } 100% { top: 0px; } } Animation can also be triggered from javascript. References Impressive Webs w3 schools Microsoft Virtual Academy