SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Intro to HTML/CSS
                      Class 4 Handout: CSS3 with jsfiddle.net

1. Go to http://jsfiddle.net/7JCWN/1/




2. Rounded Corners

Find the id selector for #corners in the CSS. Add the following declarations and click “Run”:

/* firefox */
-moz-border-radius: 20px;
/* safari and chrome*/
-webkit-border-radius: 20px;
border-radius: 20px;

This should result in the following:




                                                                                                1
Now we have rounded corners on the box labeled “rounded corners”. You can play with the
border radius to see the effect. If we change the border radius to 10px, we see a more subtle
rounding:




If we change the radius to 50%, our corners look like this:




3. Unevenly Rounded Corners

You can specify a different border radius for each corner. Find the #uneven id selector and add
the following:
 border-top-right-radius: 160px 10px;
 border-top-left-radius: 160px 20px;
 border-bottom-left-radius: 160px 10px;
 border-bottom-right-radius: 160px 20px;


                                                                                                2
4. Drop Shadows

You can add drop shadows to your div by finding the #drop id selector and adding the following:



/* firefox */
-moz-box-shadow: black 0px 5px 5px;
/* safari and chrome*/
-webkit-box-shadow: black 0px 5px 5px;
/* fallback */
box-shadow: black 0px 5px 5px;



                                                                                              3
Which will give us something looking like this:




You can change the first value to affect the vertical offset, the second value to affect the
horizontal offset and the third value to affect the blur radius. Let’s try changing these to:
/* firefox */
-moz-box-shadow: gray 0px 10px 10px;
/* safari and chrome*/
-webkit-box-shadow: gray 0px 10px 10px;
/* fallback */
box-shadow: gray 0px 10px 10px;

Notice we also changed the color from black to gray.




                                                                                                4
5. Inset Shadows

Find the id selector #inset and add the following:

/* firefox */
-moz-box-shadow: inset black 0px 5px 5px;
/* safari and chrome*/
-webkit-box-shadow: inset black 0px 5px 5px;
box-shadow: inset black 0px 5px 5px;




                                                     5
Now you can see how the shadow is inset into the box.


6. Text Shadows

Find the class selector .textShadow and add:

text-shadow: 0 2px 5px black;




                                                        6
7. Color – rgb and rgba

Find the id selectors #rgb and enter the following:

background-color: rgb(155,155,155);

Add a <div> tag to the HTML above the RGBA div:


                                                      7
<div id="rgb">Color: RGB</div>

Find the id selector #rgba and add:

background-color: rgba(155, 155, 155, 0,5);




                                              8
8. Color – hsl and hsla

Find the id selector #hsl. You will should see the following declaration:

background-color: hsl(260, 50%, 75%);

We are going to add a background-color to the #hsla selector. Find the id selector #hsla and
add the following:

background-color: hsl(260, 50%, 75%, 0.5);




I added “Color: HSLA” to the div id=”hsla” so that we could see text above.



                                                                                               9
Transforms

We are going to go to a new jsfiddle file: http://jsfiddle.net/8etSs/1/

9. Translate

Notice the positions of the rectangles in the preview pane called “pre-translate” an “post-
translate”.

Find the id selector #translate and add the following:

-webkit-transform: translateX(90px);
-moz-transform: translateX(90px);

You can see the post-translate box has moved 90px in the X direction:




                                                                                              10
10. Scale

Find the rectangles in the preview labeled pre-scale and post-scale.

Find the id selector #scale in the CSS file and add:

-webkit-transform: scale(2.0);
-moz-transform: scale(2.0);

You can now see that the post-scale rectangle is scaled up by 2:




                                                                       11
11. Scale – Vertical and Horizontal

Let’s say we want to double the width of the post-scale box and leave the height. We would add
this to the #scale selector in place of what we had before:

-webkit-transform: scale(2.0, 1.0);
-moz-transform: scale(2.0, 1.0);

We are now scaling by 2 along the x-axis and 1 along the y-axis (original height):




                                                                                            12
12 – Scale – fractional scaling

If we wanted to keep the box the same width but scale the height to 1/10, we would replace the
transform in the #scale selector with the following:

-webkit-transform: scale(1.0, 0.1);
-moz-transform: scale(1.0, 0.1);




                                                                                            13
13. Transform-origin

You can change the origin of an element to be somewhere other than the center with the
transform-origin property.

Find the id selector #origin and uncomment out the following:

-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-op-transform-origin: 0 0;
transform-origin: 0 0;

Add to #origin-hover:

-webkit-transform: scale(2.0);
-moz-transform: scale(2.0);

Now look at how the box called “make me SCALE UP on hover!” scales up when you hover
your mouse over.

Comment out the transform-origin in #origin again and look at the difference.

14. Transitions

In the above example, add the following to #origin-hover:

-webkit-transition: all 1.0s;
-moz-transition: all 1.0s;
-o-transition: all 1.0s;

This will cause the scale up in the previous example to occur over 1 second. Try changing 1.0s
to other values, like 10s.




                                                                                            14
15. Transforms – Circle with Shadow

Go to jsfiddle.net: http://jsfiddle.net/fiddlefiddle/patYu/2/

In the #shadow selector, add the following:

position: relative;
border-radius: 75px;




                                                                15

Mais conteúdo relacionado

Mais procurados

Responsive Web Design & Typography
Responsive Web Design & TypographyResponsive Web Design & Typography
Responsive Web Design & TypographyDanny Calders
 
Earn money with banner and text ads for Clickbank
Earn money with banner and text ads for ClickbankEarn money with banner and text ads for Clickbank
Earn money with banner and text ads for ClickbankJaroslaw Istok
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える拓樹 谷
 
Earn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbankEarn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbankJaroslaw Istok
 
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Nicholas Dionysopoulos
 
Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本a5494535
 
Advanced Thesis Techniques and Tricks
Advanced Thesis Techniques and TricksAdvanced Thesis Techniques and Tricks
Advanced Thesis Techniques and TricksBrad Williams
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesAndy Wallace
 
In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how... In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how... British Council
 
Bringing Typography to the Web with sIFR 3 at <head>
Bringing Typography to the Web with sIFR 3 at <head>Bringing Typography to the Web with sIFR 3 at <head>
Bringing Typography to the Web with sIFR 3 at <head>Mark Wubben
 
Worth the hype - styled components
Worth the hype - styled componentsWorth the hype - styled components
Worth the hype - styled componentskathrinholzmann
 
Joomla! Day UK 2009 Menus Presentation
Joomla! Day UK 2009 Menus PresentationJoomla! Day UK 2009 Menus Presentation
Joomla! Day UK 2009 Menus PresentationAndy Wallace
 

Mais procurados (20)

Responsive Web Design & Typography
Responsive Web Design & TypographyResponsive Web Design & Typography
Responsive Web Design & Typography
 
Handout3 links
Handout3 linksHandout3 links
Handout3 links
 
Earn money with banner and text ads for Clickbank
Earn money with banner and text ads for ClickbankEarn money with banner and text ads for Clickbank
Earn money with banner and text ads for Clickbank
 
Tmx9
Tmx9Tmx9
Tmx9
 
モダンなCSS設計パターンを考える
モダンなCSS設計パターンを考えるモダンなCSS設計パターンを考える
モダンなCSS設計パターンを考える
 
Earn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbankEarn money with banner and text ads for clickbank
Earn money with banner and text ads for clickbank
 
Wiidget
WiidgetWiidget
Wiidget
 
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
Joomla! Frappe - Κατασκευή εφαρμογών για το Joomla! χωρίς να τραβάτε τα μαλιά...
 
Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本Simple Blue Blog Template XML 的副本
Simple Blue Blog Template XML 的副本
 
Advanced Thesis Techniques and Tricks
Advanced Thesis Techniques and TricksAdvanced Thesis Techniques and Tricks
Advanced Thesis Techniques and Tricks
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic Templates
 
In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how... In some simple steps, your site can stand out from the rest. Here's how...
In some simple steps, your site can stand out from the rest. Here's how...
 
Bringing Typography to the Web with sIFR 3 at <head>
Bringing Typography to the Web with sIFR 3 at <head>Bringing Typography to the Web with sIFR 3 at <head>
Bringing Typography to the Web with sIFR 3 at <head>
 
Worth the hype - styled components
Worth the hype - styled componentsWorth the hype - styled components
Worth the hype - styled components
 
Responsive Typography II
Responsive Typography IIResponsive Typography II
Responsive Typography II
 
Theme 23
Theme 23Theme 23
Theme 23
 
Landing Pages 101
Landing Pages 101Landing Pages 101
Landing Pages 101
 
Joomla! Day UK 2009 Menus Presentation
Joomla! Day UK 2009 Menus PresentationJoomla! Day UK 2009 Menus Presentation
Joomla! Day UK 2009 Menus Presentation
 
LESS
LESSLESS
LESS
 
Theme02
Theme02Theme02
Theme02
 

Destaque

Strategic sourcing change 2010
Strategic sourcing change 2010Strategic sourcing change 2010
Strategic sourcing change 2010derupert
 
휴대폰 블랙리스트 제도
휴대폰 블랙리스트 제도휴대폰 블랙리스트 제도
휴대폰 블랙리스트 제도우섭 이
 
infecções de pele e anexos
infecções de pele e anexos infecções de pele e anexos
infecções de pele e anexos Anna de Melo
 
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...Erin M. Kidwell
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Erin M. Kidwell
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
The gujarati language
The gujarati languageThe gujarati language
The gujarati languageRajan Bhatt
 
SNS와 Privacy
SNS와 PrivacySNS와 Privacy
SNS와 Privacy우섭 이
 
증강현실과 가상현실
증강현실과 가상현실증강현실과 가상현실
증강현실과 가상현실우섭 이
 
Class 1 handout (2) html exercises
Class 1 handout (2) html exercisesClass 1 handout (2) html exercises
Class 1 handout (2) html exercisesErin M. Kidwell
 
Class 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetClass 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetErin M. Kidwell
 

Destaque (15)

Strategic sourcing change 2010
Strategic sourcing change 2010Strategic sourcing change 2010
Strategic sourcing change 2010
 
휴대폰 블랙리스트 제도
휴대폰 블랙리스트 제도휴대폰 블랙리스트 제도
휴대폰 블랙리스트 제도
 
Cloud
CloudCloud
Cloud
 
infecções de pele e anexos
infecções de pele e anexos infecções de pele e anexos
infecções de pele e anexos
 
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...Class 3 Intro to HTML/ CSS Gdi cincinnati   create a table layout with html (...
Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (...
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
 
Presentation1
Presentation1Presentation1
Presentation1
 
Tablet PC
Tablet PCTablet PC
Tablet PC
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
The gujarati language
The gujarati languageThe gujarati language
The gujarati language
 
LTE
LTELTE
LTE
 
SNS와 Privacy
SNS와 PrivacySNS와 Privacy
SNS와 Privacy
 
증강현실과 가상현실
증강현실과 가상현실증강현실과 가상현실
증강현실과 가상현실
 
Class 1 handout (2) html exercises
Class 1 handout (2) html exercisesClass 1 handout (2) html exercises
Class 1 handout (2) html exercises
 
Class 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetClass 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheet
 

Semelhante a Class 4 handout w css3 using j fiddle

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
 
HTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsHTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsMo Jangda
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3 Wynn Netherland
 
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 ConsSanjoy Kr. Paul
 
CSS3 : Animation ,Transitions, Gradients
CSS3 : Animation ,Transitions, GradientsCSS3 : Animation ,Transitions, Gradients
CSS3 : Animation ,Transitions, GradientsJatin_23
 
CSS3: Ready for Primetime?
CSS3: Ready for Primetime?CSS3: Ready for Primetime?
CSS3: Ready for Primetime?Jeff Bridgforth
 
Keep calm and let's play CSS3
Keep calm and let's play CSS3Keep calm and let's play CSS3
Keep calm and let's play CSS3A2 Comunicação
 
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
 
Getting Started with Sass & Compass
Getting Started with Sass & CompassGetting Started with Sass & Compass
Getting Started with Sass & CompassRob Davarnia
 
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
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventRobert Nyman
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With LessDavid Engel
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]ThemePartner
 

Semelhante a Class 4 handout w css3 using j fiddle (20)

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
 
Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
HTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwordsHTML5, CSS3, and other fancy buzzwords
HTML5, CSS3, and other fancy buzzwords
 
Css3
Css3Css3
Css3
 
Big Design Conference: CSS3
Big Design Conference: CSS3 Big Design Conference: CSS3
Big Design Conference: CSS3
 
[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover[heweb11] CSS3 Makeover
[heweb11] CSS3 Makeover
 
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
 
CSS3 : Animation ,Transitions, Gradients
CSS3 : Animation ,Transitions, GradientsCSS3 : Animation ,Transitions, Gradients
CSS3 : Animation ,Transitions, Gradients
 
INTRODUCTIONS OF CSS PART 2
INTRODUCTIONS OF CSS PART 2INTRODUCTIONS OF CSS PART 2
INTRODUCTIONS OF CSS PART 2
 
CSS3: Ready for Primetime?
CSS3: Ready for Primetime?CSS3: Ready for Primetime?
CSS3: Ready for Primetime?
 
CSS3 3D Workshop
CSS3 3D WorkshopCSS3 3D Workshop
CSS3 3D Workshop
 
Keep calm and let's play CSS3
Keep calm and let's play CSS3Keep calm and let's play CSS3
Keep calm and let's play CSS3
 
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)
 
Getting Started with Sass & Compass
Getting Started with Sass & CompassGetting Started with Sass & Compass
Getting Started with 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
 
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte eventHTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
HTML5 and CSS3 – exploring mobile possibilities - Dynabyte event
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
Doing More With Less
Doing More With LessDoing More With Less
Doing More With Less
 
Learn to Love CSS3 [English]
Learn to Love CSS3 [English]Learn to Love CSS3 [English]
Learn to Love CSS3 [English]
 
CSS Extenders
CSS ExtendersCSS Extenders
CSS Extenders
 

Último

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
"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
 
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
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Último (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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
 
"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
 
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
 
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
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Class 4 handout w css3 using j fiddle

  • 1. Intro to HTML/CSS Class 4 Handout: CSS3 with jsfiddle.net 1. Go to http://jsfiddle.net/7JCWN/1/ 2. Rounded Corners Find the id selector for #corners in the CSS. Add the following declarations and click “Run”: /* firefox */ -moz-border-radius: 20px; /* safari and chrome*/ -webkit-border-radius: 20px; border-radius: 20px; This should result in the following: 1
  • 2. Now we have rounded corners on the box labeled “rounded corners”. You can play with the border radius to see the effect. If we change the border radius to 10px, we see a more subtle rounding: If we change the radius to 50%, our corners look like this: 3. Unevenly Rounded Corners You can specify a different border radius for each corner. Find the #uneven id selector and add the following: border-top-right-radius: 160px 10px; border-top-left-radius: 160px 20px; border-bottom-left-radius: 160px 10px; border-bottom-right-radius: 160px 20px; 2
  • 3. 4. Drop Shadows You can add drop shadows to your div by finding the #drop id selector and adding the following: /* firefox */ -moz-box-shadow: black 0px 5px 5px; /* safari and chrome*/ -webkit-box-shadow: black 0px 5px 5px; /* fallback */ box-shadow: black 0px 5px 5px; 3
  • 4. Which will give us something looking like this: You can change the first value to affect the vertical offset, the second value to affect the horizontal offset and the third value to affect the blur radius. Let’s try changing these to: /* firefox */ -moz-box-shadow: gray 0px 10px 10px; /* safari and chrome*/ -webkit-box-shadow: gray 0px 10px 10px; /* fallback */ box-shadow: gray 0px 10px 10px; Notice we also changed the color from black to gray. 4
  • 5. 5. Inset Shadows Find the id selector #inset and add the following: /* firefox */ -moz-box-shadow: inset black 0px 5px 5px; /* safari and chrome*/ -webkit-box-shadow: inset black 0px 5px 5px; box-shadow: inset black 0px 5px 5px; 5
  • 6. Now you can see how the shadow is inset into the box. 6. Text Shadows Find the class selector .textShadow and add: text-shadow: 0 2px 5px black; 6
  • 7. 7. Color – rgb and rgba Find the id selectors #rgb and enter the following: background-color: rgb(155,155,155); Add a <div> tag to the HTML above the RGBA div: 7
  • 8. <div id="rgb">Color: RGB</div> Find the id selector #rgba and add: background-color: rgba(155, 155, 155, 0,5); 8
  • 9. 8. Color – hsl and hsla Find the id selector #hsl. You will should see the following declaration: background-color: hsl(260, 50%, 75%); We are going to add a background-color to the #hsla selector. Find the id selector #hsla and add the following: background-color: hsl(260, 50%, 75%, 0.5); I added “Color: HSLA” to the div id=”hsla” so that we could see text above. 9
  • 10. Transforms We are going to go to a new jsfiddle file: http://jsfiddle.net/8etSs/1/ 9. Translate Notice the positions of the rectangles in the preview pane called “pre-translate” an “post- translate”. Find the id selector #translate and add the following: -webkit-transform: translateX(90px); -moz-transform: translateX(90px); You can see the post-translate box has moved 90px in the X direction: 10
  • 11. 10. Scale Find the rectangles in the preview labeled pre-scale and post-scale. Find the id selector #scale in the CSS file and add: -webkit-transform: scale(2.0); -moz-transform: scale(2.0); You can now see that the post-scale rectangle is scaled up by 2: 11
  • 12. 11. Scale – Vertical and Horizontal Let’s say we want to double the width of the post-scale box and leave the height. We would add this to the #scale selector in place of what we had before: -webkit-transform: scale(2.0, 1.0); -moz-transform: scale(2.0, 1.0); We are now scaling by 2 along the x-axis and 1 along the y-axis (original height): 12
  • 13. 12 – Scale – fractional scaling If we wanted to keep the box the same width but scale the height to 1/10, we would replace the transform in the #scale selector with the following: -webkit-transform: scale(1.0, 0.1); -moz-transform: scale(1.0, 0.1); 13
  • 14. 13. Transform-origin You can change the origin of an element to be somewhere other than the center with the transform-origin property. Find the id selector #origin and uncomment out the following: -webkit-transform-origin: 0 0; -moz-transform-origin: 0 0; -op-transform-origin: 0 0; transform-origin: 0 0; Add to #origin-hover: -webkit-transform: scale(2.0); -moz-transform: scale(2.0); Now look at how the box called “make me SCALE UP on hover!” scales up when you hover your mouse over. Comment out the transform-origin in #origin again and look at the difference. 14. Transitions In the above example, add the following to #origin-hover: -webkit-transition: all 1.0s; -moz-transition: all 1.0s; -o-transition: all 1.0s; This will cause the scale up in the previous example to occur over 1 second. Try changing 1.0s to other values, like 10s. 14
  • 15. 15. Transforms – Circle with Shadow Go to jsfiddle.net: http://jsfiddle.net/fiddlefiddle/patYu/2/ In the #shadow selector, add the following: position: relative; border-radius: 75px; 15