eg-259:css3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eg-259:css3 [2008/09/24 17:07] – eechris | eg-259:css3 [2011/01/14 12:46] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~SLIDESHOW~~ | ||
+ | ====== CSS 3 ====== | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | |||
+ | ===== Introduction to CCS 3 ===== | ||
+ | |||
+ | * What is it? | ||
+ | * What does it provide? | ||
+ | * Evolutionary | ||
+ | |||
+ | ---- | ||
+ | |||
+ | * What is it? | ||
+ | * extension to CSS 2 | ||
+ | * modular -- many modules at different levels of completeness | ||
+ | * backwards compatible | ||
+ | * What does it provide? | ||
+ | * new properties and new selectors | ||
+ | * improvements to make common layout and effects easier | ||
+ | * Evolutionary | ||
+ | * browser developers gradually adopting features | ||
+ | * other features provided by JavaScript libraries | ||
+ | |||
+ | ===== (Some of ) the Modules ===== | ||
+ | |||
+ | * The Box Model | ||
+ | * Lists Module | ||
+ | * Hyperlink Presentation | ||
+ | * Speech Module | ||
+ | * Backgrounds and Borders | ||
+ | * Text Effects | ||
+ | * Multi-Column Layout | ||
+ | |||
+ | Many more, including indication of status, at [[http:// | ||
+ | |||
+ | ===== Example: Borders ===== | ||
+ | |||
+ | * Rounded Borders -- '' | ||
+ | * Gradients -- '' | ||
+ | * Drop Shadows -- '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | **Notes** | ||
+ | |||
+ | //Rounded Corners// | ||
+ | |||
+ | Achieving rounded borders using current CSS coding can be tricky -– there are numerous methods available, but none are extremely straight forward. Creating individual images for each border is often needed in addition. Using CSS3, creating a rounded border is incredibly easy. It can be applied to each corner or individual corners, and the width/ | ||
+ | |||
+ | <code css> | ||
+ | background-color: | ||
+ | -moz-border-radius: | ||
+ | -webkit-border-radius: | ||
+ | border: 2px solid #897048; | ||
+ | padding: 10px; | ||
+ | width: 310px; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Note until the new CSS3 properties are supported by all browsers a convention has developed wherein a browser prefix is added to the property. thus for Firefox: '' | ||
+ | |||
+ | < | ||
+ | <p style=" | ||
+ | -moz-border-radius: | ||
+ | -webkit-border-radius: | ||
+ | border: 2px solid #897048; | ||
+ | padding: 10px; | ||
+ | width: 310px;"> | ||
+ | (will only work in Firefox 3+, Safari and Chrome)</ | ||
+ | |||
+ | // | ||
+ | |||
+ | Gradient borders can look effective if used correctly. The code is a little more complex, requiring you to define each colour of the gradient. The CSS code is: | ||
+ | |||
+ | <code css> | ||
+ | .border_gradient { | ||
+ | border: 8px solid #000; | ||
+ | -moz-border-bottom-colors:# | ||
+ | -moz-border-top-colors: | ||
+ | -moz-border-left-colors: | ||
+ | -moz-border-right-colors:# | ||
+ | padding: 5px 5px 5px 15px; | ||
+ | width: 300px; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <p style=" | ||
+ | -moz-border-bottom-colors:# | ||
+ | -moz-border-top-colors: | ||
+ | -moz-border-left-colors: | ||
+ | -moz-border-right-colors:# | ||
+ | padding: 5px 5px 5px 15px; | ||
+ | width: 300px;"> | ||
+ | |||
+ | //Box Shadows// | ||
+ | |||
+ | Adding a shadow to an element is difficult at present –- it is a good way to differentiate a certain area, but as with any effect, it should be used sparingly. The CSS code is: | ||
+ | |||
+ | <code css> | ||
+ | .border_shadow { | ||
+ | -webkit-box-shadow: | ||
+ | padding: 5px 5px 5px 15px; | ||
+ | width: 300px; | ||
+ | }</ | ||
+ | |||
+ | < | ||
+ | <p style=" | ||
+ | padding: 5px 5px 5px 15px; | ||
+ | width: 300px;"> | ||
+ | ===== Demos ====== | ||
+ | |||
+ | * Many modules are not fully defined | ||
+ | * Some modules are partially defined but implemented in browsers in an experimental sense | ||
+ | * Some modules are complete | ||
+ | * The examples [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ===== Further Reading ===== | ||
+ | |||
+ | * See notes for links. | ||
+ | * Live links in module notebook on Blackboard site (External Links) | ||
+ | |||
+ | ---- | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * // | ||
+ | |||
+ | ===== The Structural and Presentation Layers ===== | ||
+ | |||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: |