SlideShare a Scribd company logo
1 of 40
Download to read offline
TAO OF CSS
ROB PORTER
I LOVE CSS WAY TOO MUCH
Rob Porter
BASIC CSS SHAPES
▸ Circle
▸ Square
▸ Rectangle
▸ Ovals
.circle {
background-color:
#298BE2;
width: 200px;
height: 200px;
border-radius: 50%;
}
<div class=“max-circle">
<img src="Max-fall.png" />
</div>
.square {
background: #298BE2;
width: 200px;
height: 200px;
}
.rectangle {
background-color: #298BE2;
width: 100px;
height: 200px;
float: left;
}
.oval {
width: 100px;
height: 200px;
background-color: #298BE2;
/*border-radius: 50px / 100px;*/
border-radius: 50%;
}
BORDER DRAWN CSS SHAPES
▸ Triangles
▸ Trapezoid
▸ Star
.triangle-up {
width: 0;
height: 0;
border-left: 50px solid
transparent;
border-right: 50px solid
transparent;
border-bottom: 100px
solid #298BE2;
}
Triangles
.triangle-up {
width: 0;
height: 0;
border-left: 50px solid
white;
border-right: 50px solid
white;
border-bottom: 100px
solid #298BE2;
}
Triangles
.triangle-down {
width: 0;
height: 0;
border-left: 50px solid
transparent;
border-right: 50px solid
transparent;
border-top: 100px solid
#298BE2;
}
Triangles
.triangle-right {
width: 0;
height: 0;
border-top: 50px solid
transparent;
border-left: 100px solid
#298BE2;
border-bottom: 50px
solid transparent;
}
Triangles
.triangle-left {
width: 0;
height: 0;
border-top: 50px solid
transparent;
border-right: 100px
solid #298BE2;
border-bottom: 50px
solid transparent;
}
Triangles
.triangle-top-left {
width: 0;
height: 0;
border-top: 100px solid
#298BE2;
border-right: 100px solid
transparent;
}
Triangles
.triangle-top-left {
width: 0;
height: 0;
border-top: 100px solid
#298BE2;
border-right: 100px solid
white;
}
Triangles
.triangle-top-right {
width: 0;
height: 0;
border-top: 100px solid
#298BE2;
border-left: 100px solid
transparent;
}
Triangles
.triangle-bottom-left {
width: 0;
height: 0;
border-bottom: 100px
solid #298BE2;
border-right: 100px solid
transparent;
}
Triangles
.triangle-bottom-right {
width: 0;
height: 0;
border-bottom: 100px
solid #298BE2;
border-left: 100px solid
transparent;
}
Triangles
Triangles
.trapezoid {
height: 0;
width: 100px;
border-bottom: 100px
solid #298BE2;
border-left: 50px solid
transparent;
border-right: 50px solid
transparent;
}
Triangles
.star-six {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 100px solid #298BE2;
position: relative;
}
Triangles
.star-six:after {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 100px solid #298BE2;
position: absolute;
content: "";
top: 30px;
left: -50px;
}
COOL CSS SHAPES
▸ Talk Bubble
▸ Pac-Man
▸ Yin Yang
.t.talkbubble {
width: 120px;
height: 80px;
background: #298BE2;
position: relative;
border-radius: 10px;
margin-left: 26px;
padding: 1em 0em 0em 1.4em;
font-size: 1.5em;
font-weight: bold;
}
.talkbubble:before {
content:"";
position: absolute;
right: 100%;
top: 26px;
width: 0;
height: 0;
border-top: 13px solid transparent;
border-right: 26px solid #298BE2;
border-bottom: 13px solid transparent;
}
.pacman {
width: 0px;
height: 0px;
border-right: 60px solid transparent;
border-top: 60px solid #E9E900;
border-left: 60px solid #E9E900;
border-bottom: 60px solid #E9E900;
border-radius: 60px;
}
.yin-yang {
/* by Alexander Futekov */
width: 96px;
height: 48px;
background: #eee;
border-color: #298BE2;
border-style: solid;
border-width: 2px 2px 50px 2px;
border-radius: 100%;
position: relative;
}
.yin-yang:before {
content: "";
position: absolute;
top: 50%;
left: 0;
background: #eee;
border: 18px solid #298BE2;
border-radius: 100%;
width: 12px;
height: 12px;
}
.yin-yang:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
background: #298BE2;
border: 18px solid #eee;
border-radius:100%;
width: 12px;
height: 12px;
}
CSS TRANSFORMS
▸ Skew, SkewX(), SkewY()
▸ Scale, ScaleX(), ScaleY()
▸ Rotate
▸ Translate
.rectangle2.skew {
transform: skewX(20deg);
margin-left: 21px;
font-size: 2em;
padding: 0.3em;
display: inline-block;
}
.rectangle2.skew:hover {
transform: skewX(-20deg);
}
.scalable .scale:hover {
transform: scale(1.2);
}
Triangles
.heart {
/* by http://nicolasgallagher.com/ */
position: relative;
width: 100px;
height: 90px;
}
Heart
.heart:before, .heart:after {
position: absolute;
content: "";
left: 50px;
top: 0;
width: 50px;
height: 80px;
background: red;
border-radius: 50px 50px 0 0;
transform: rotate(-45deg);
transform-origin: 0 100%;
}
.heart:after {
left: 0;
transform: rotate(45deg);
transform-origin :100% 100%;
}
Rotate
.infinity {
/* by http://nicolasgallagher.com/ */
position: relative;
width: 212px;
height: 100px;
}
Heart
.infinity:before, .infinity:after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 60px;
height: 60px;
border: 20px solid #298BE2;
border-radius: 50px 50px 0 50px;
transform: rotate(-45deg);
}
.infinity:after {
left: auto;
right: 0;
border-radius: 50px 50px 50px 0
transform: rotate(45deg);
}
Rotate
.rotate .yin-yang:hover {
transform: rotate(99deg);
}
.translate .pacman:hover {
transform: translate(50px,
0px);
border-right: 60px solid
#E9E900;
}
CSS TRANSITIONS
.example {
transition: [transition-property] [transition-duration]
[transition-timing-function] [transition-delay];
}
CSS TRANSITIONS
.foo {
transition: background-color 0.5s linear;
}
.drupal {
transition: all 1.5s ease-out;
}
.Plone {
transition: all 1.5s ease-in;
}
http://css3.bradshawenterprises.com/transitions/
CSS TRANSITIONS
ease
linear
ease-in
ease-out
ease-in-out
step-start
step-end
cubic-bezier(0, 0, 0.58, 1);
http://css3.bradshawenterprises.com/transitions/
Thank you!
Rob Porter
Email: rob.porter@wildcardcorp.com
Twitter: @robzonenet
PLEASE USE THE
SURVEY APP TO SEND
US FEEDBACK.
HELP US IMPROVE!
ploneconf.sixfeetup.com

More Related Content

Similar to Tao of CSS

Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docxWeek ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docxphilipnelson29183
 
Making Links Magical Again with CSS
Making Links Magical Again with CSSMaking Links Magical Again with CSS
Making Links Magical Again with CSSJenn Lukas
 
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docxcssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docxfaithxdunce63732
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandThemePartner
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]ThemePartner
 
Yeni metin belgesi (2)
Yeni metin belgesi (2)Yeni metin belgesi (2)
Yeni metin belgesi (2)makarnalar
 
HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)Dinis Correia
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Yeardezyneecole
 
Bloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noBloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noHannee92
 
Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2cori0506
 

Similar to Tao of CSS (20)

Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docxWeek ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
Week ThreeExpress Holidayscssstyle.csshtml{ height 100.docx
 
Making Links Magical Again with CSS
Making Links Magical Again with CSSMaking Links Magical Again with CSS
Making Links Magical Again with CSS
 
Theme03
Theme03Theme03
Theme03
 
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docxcssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
cssblocks.css.b_page{ width 930px; margin 0 auto; position.docx
 
Theme 23
Theme 23Theme 23
Theme 23
 
Sass, Compass
Sass, CompassSass, Compass
Sass, Compass
 
Learn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day DeutschlandLearn to love CSS3 | Joomla! Day Deutschland
Learn to love CSS3 | Joomla! Day Deutschland
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 
Yeni metin belgesi (2)
Yeni metin belgesi (2)Yeni metin belgesi (2)
Yeni metin belgesi (2)
 
Theme02
Theme02Theme02
Theme02
 
HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)HTML&CSS 5 - Intermediate CSS (2/2)
HTML&CSS 5 - Intermediate CSS (2/2)
 
Harendra Singh,BCA Third Year
Harendra Singh,BCA Third YearHarendra Singh,BCA Third Year
Harendra Singh,BCA Third Year
 
Css rounded corners
Css   rounded cornersCss   rounded corners
Css rounded corners
 
Bloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.noBloggdesign #2 - hawaa.blogg.no
Bloggdesign #2 - hawaa.blogg.no
 
Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2Corilennyg gmail-com-rsp2
Corilennyg gmail-com-rsp2
 
Formato encuesta
Formato encuestaFormato encuesta
Formato encuesta
 
This is a test
This is a testThis is a test
This is a test
 
Css 2
Css 2Css 2
Css 2
 
Css
CssCss
Css
 
Css 3
Css 3Css 3
Css 3
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"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
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"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
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Tao of CSS