CSS3
CSS 3
INTRODUCTION
The cascading stylesheet completely background compatible.
CSS is a language for describing the rendering of structured documents.
CSS3 most important Module has
• Selectors
• Box Model
• Backgrounds and Borders
• Text Effects
• 2D/3D Transformations
• Animations
• Multiple Column Layout
• User Interface
CSS is a language for describing the rendering of structured documents.
CSS3 most important Module has
• Selectors
• Box Model
• Backgrounds and Borders
• Text Effects
• 2D/3D Transformations
• Animations
• Multiple Column Layout
• User Interface
CSS 3 BORDER
The cascading stylesheet completely background compatible.
CSS is a language for describing the rendering of structured documents.
CSS3 most important Module has
• Selectors
• Box Model
• Backgrounds and Borders
• Text Effects
• 2D/3D Transformations
• Animations
• Multiple Column Layout
• User Interface
CSS is a language for describing the rendering of structured documents.
CSS3 most important Module has
• Selectors
• Box Model
• Backgrounds and Borders
• Text Effects
• 2D/3D Transformations
• Animations
• Multiple Column Layout
• User Interface
BACKGROUND
CSS 3 BACKGROUND
CSS3 give you a way to specify the size of the background images.
You can specify the size in pixels, width and height or in percentage.
CSS3 allows us to re-use background images in different contexts.
the background image size was determined by the actual size of the image.
In CSS3 it is possible to specify the size of the background image.
The size is relative to the width or height of the area that you have pointed out using
Background-origin.
You can specify the size in pixels, width and height or in percentage.
CSS3 allows us to re-use background images in different contexts.
the background image size was determined by the actual size of the image.
In CSS3 it is possible to specify the size of the background image.
The size is relative to the width or height of the area that you have pointed out using
Background-origin.
CSS 3 BACKGROUND PROPERTIES
Backgroud Properties having two types
Background-size
Background-origin
Background-size
Background-origin
Background-size
background-size Syntax:
background-size: [[ | | auto] {1, 2} || round]
background-size Syntax:
background-size: [[
• length – A specific size
• Percentage – A size relative to the container element.
• round – tells the user agent to get it close to that width or height
• Percentage – A size relative to the container element.
• round – tells the user agent to get it close to that width or height
Example
|
Background-origin
The background-origin property is used to determine how the background-position
of a background in a certain box is calculated.
It takes three different values, border-box, padding-box and content-box.
of a background in a certain box is calculated.
It takes three different values, border-box, padding-box and content-box.
Example
|
2D TRANSFORMS
CSS 3 2D TRANSFORMS
INTRODUCTION
CSS 2D Transforms allow elements rendered by CSS to be transformed in two-dimensional space.
The type ‘translation-value’ is defined as a ‘length’ or ‘percentage’ value, and the ‘angle’ type is defined by CSS Values and Units.
This property contains a list of transform functions
The ‘transform-origin’ property establishes the origin of transformation for an element.
The type ‘translation-value’ is defined as a ‘length’ or ‘percentage’ value, and the ‘angle’ type is defined by CSS Values and Units.
This property contains a list of transform functions
The ‘transform-origin’ property establishes the origin of transformation for an element.
THE TRANSFORMATION METHOD
• translate()
• rotate()
• scale()
• skew()
• matrix()
• rotate()
• scale()
• skew()
• matrix()
Matrix () Method:
Syntax:
matrix (‘number’, ‘number’, ‘number’, ‘number’, ‘number’, ‘number’)
matrix (‘number’, ‘number’, ‘number’, ‘number’, ‘number’, ‘number’)
Specifies a 2D transformation in the form of a transformation matrix of six values. matrix (a,b,c,d,e,f)
Example
|
Translate () Method:
Syntax:
translate (‘translation-value’ [, 'translation-value'])
translate (‘translation-value’ [, 'translation-value'])
The translate () method, the element moves from its current position, depending on the parameters given for the left (X-axis) and the top (Y-axis) position
translateX (‘translation-value’)
specifies a translation by the given amount in the X direction.
translateY (‘translation-value’)
Specifies a translation by the given amount in the Y direction.
specifies a translation by the given amount in the X direction.
translateY (‘translation-value’)
Specifies a translation by the given amount in the Y direction.
Example
|
Scale () Method:
Syntax:
scale (‘number’ [, 'number'])
scale (‘number’ [, 'number'])
With the scale () method, the element increases or decreases the size, depending on the parameters given for the width (X-axis) and the height (Y-axis)
ScaleX (‘number’)
Specifies a scale operation using the [sx, 1] scaling vector, where sx is given as the parameter.
scaleY (‘number’)
specifies a scale operation using the [1,sy] scaling vector, where sy is given as the parameter.
Specifies a scale operation using the [sx, 1] scaling vector, where sx is given as the parameter.
scaleY (‘number’)
specifies a scale operation using the [1,sy] scaling vector, where sy is given as the parameter.
Example
|
Rotate () Method:
The rotate () method, the element rotates clockwise at a given degree. Negative values are allowed and rotates the element counter-clockwise.
Example
|
Skew () Method:
Syntax:
skew (‘angle’ [, 'angle'])
skew (‘angle’ [, 'angle'])
The skew () method, the element turns in a given angle, depending on the parameters given for the horizontal (X-axis) and the vertical (Y-axis) lines.
skewX (‘angle’)
Specifies a skew transformation along the X axis by the given angle.
skewY (‘angle’)
Specifies a skew transformation along the Y axis by the given angle.
Specifies a skew transformation along the X axis by the given angle.
skewY (‘angle’)
Specifies a skew transformation along the Y axis by the given angle.
Example
|
3D TRANSFORMS
CSS 3 3D TRANSFORMS
INTRODUCTION
CSS 3D Transforms extends CSS Transforms to allow elements rendered by
CSS to be transformed in three-dimensional space.
3D transforms elements can be translated, rotated and scaled in two or three dimensional space
CSS to be transformed in three-dimensional space.
3D transforms elements can be translated, rotated and scaled in two or three dimensional space
3D TRANSFORM PROPERTIES
Transform: A 2D or 3D transformation is applied to an element through the transform.
Transform-origin: Allows you to change the position on transformed elements
Transform-style: defines how nested elements are rendered in 3D space
Perspective: The perspective property applies the same transform as the
perspective() transform function
Perspective-origin: The perspective-origin property establishes the origin for
the
perspective property.
Backface-visibility: Defines whether or not an element should be visible when not facing
the screen
Transform-origin: Allows you to change the position on transformed elements
Transform-style: defines how nested elements are rendered in 3D space
Perspective: The perspective property applies the same transform as the
perspective(
Perspective-origin: The perspective-origin property establishes the origin for
the
perspective property.
Backface-visibility: Defines whether or not an element should be visible when not facing
the screen
3D TRANSFORMATION FUNCTION
Matrix() Method:
Syntax:
matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,)
This method specifies a 3D transformation as a 4×4 homogeneous matrix of
16 values in column-major order.
matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,)
This method specifies a 3D transformation as a 4×4 homogeneous matrix of
16 values in column-major order.
Translate() Method:
Syntax:
translate3d (‘translation-value’, ‘translation-value’, ‘translation-value’)
translate3d (‘translation-value’, ‘translation-value’, ‘translation-value’)
This method using the 3D translation
translateX (‘translation-value’)
This method specifies a translation by the given amount in the X direction.
translateY (‘translation-value’)
This methodspecifies a translation by the given amount in the Y direction.
translateZ(‘translation-value’)
This method specifies a translation by the given amount in the Z direction
This method specifies a translation by the given amount in the X direction.
translateY (‘translation-value’)
This methodspecifies a translation by the given amount in the Y direction.
translateZ(‘translation-value’)
This method specifies a translation by the given amount in the Z direction
Scale () Method:
Syntax:
scale3d (‘number’, ‘number’, ‘number’)
scale3d (‘number’, ‘number’, ‘number’)
This method defines the 3D scale translation.
scaleX (‘number’)
This method defines a 3D scale transformation by giving a value for the X-axis
scsaleY(‘number’)
This method defines a 3D scale transformation by giving a value for the Y-axis
scaleZ (‘number)
Thia method defines a 3D scale transformation by giving a value for the
scaleX (‘number’)
This method defines a 3D scale transformation by giving a value for the X-axis
scsaleY(‘number’)
This method defines a 3D scale transformation by giving a value for the Y-axis
scaleZ (‘number)
Thia method defines a 3D scale transformation by giving a value for the
Rotate () Method:
Syntax:
Rotate3D (‘number, ‘number, ‘number’ ‘angle)
This method defines the 3D Rotation
rotateX (‘angle’)
Specifies a clockwise rotation by the given angle about the X axis.
rotateY (‘angle’)
specifies a clockwise rotation by the given angle about the Y axis.
rotateZ(‘angle’)
specifies a clockwise rotation by the given angle about the Z axis.
rotateX (‘angle’)
Specifies a clockwise rotation by the given angle about the X axis.
rotateY (‘angle’)
specifies a clockwise rotation by the given angle about the Y axis.
rotateZ(‘angle’)
specifies a clockwise rotation by the given angle about the Z axis.
perspective (‘length’)
This method specifies a perspective projection matrix
This method specifies a perspective projection matrix
FONT
CSS 3 FONT
web designers had to use fonts that were already installed on the user’s computer.
The CSS3 is the font-face rule you define a name for the font.
The CSS3 is the font-face rule you define a name for the font.
Example
|
BOLD TEXT
The @font-face rule containing descriptors for bold text.
CSS3 FONT DESCRIPTION
Descriptor
Values
Description
Font_family
name
Defines a name for the font
url
URL
Defines the URL to the font file
Font-stretch
Normal Condensed
Defines the url of an image to display
Ultra-Condensed
extra-condensed
semi-condensed
expanded
semi-expanded
extra-expanded
ultra-expanded
Font-style
Normal
Defines how the font should be
Italic
styled.Default is “normal”
Font-weight
Normal
Defines the boldness of the font.
bold
Default is “normal
100
200
300
400
500
600
700
800
900
Unocode-rang
Unicode-rang
Defines the range of UNICODE
characters the font supports.
Default is “U+0-10FFFF”
Example
|
ANIMATIONS
CSS 3 ANIMATION
INTRODUCTION
The @keyframes rule is where the animation is created
The ‘from’ transform is the transform at the start of the transition or current keyframe.
The ‘end’ transform is the transform at the end of the transition or current keyframe.
The keywords “from” and “to”, which is the same as 0% and 100%.
The ‘from’ transform is the transform at the start of the transition or current keyframe.
The ‘end’ transform is the transform at the end of the transition or current keyframe.
The keywords “from” and “to”, which is the same as 0% and 100%.
Example
|
The 0% is beginning of the animation, 100% is when the animation is complete
Example
|
CSS3 ANIMATION PROPERTIES
Properties
Description
@keyframes
Specifies the animation
animation
A shorthand property for all the the animation properties, except the animation-play-state property
animation-name
Specifies the name of the @keyframes animation
animation-duration
Specifies how many seconds or milliseconds an animation takes to complete one cycle. Default 0
animation-timing-function
Describes how the animation will progress over one cycle of its duration.
animation-delay
Specifies when the animation will start
animation-iteration-count
Specifies the number of times an animation is played. Default 1
animation-direction
Specifies whether or not the animation should play in reverse on alternate cycles. Default “normal”
animation-play-state
Specifies whether the animation is running or paused. Default “running”
Example
|
SELECTORS
CSS3 SELECTOR
A Selector represents a structure.
Selectors may range from simple element names to rich contextual representations.
Selectors may range from simple element names to rich contextual representations.
Attribute Selector:
att^=val]: Selects every a element whose src attribute value begins with “https”
[att$=val]: Represents an element with the att attribute whose value ends with the
suffix “val”.
[att*=val]: This attribute whose value contains at least one instance of the substring
“val”.
[att$=val]: Represents an element with the att attribute whose value ends with the
suffix “val”.
[att*=val]: This attribute whose value contains at least one instance of the substring
“val”.
Id Selector:
An ID selector contains a “number sign”.
An ID selector represents an element instance that has an identifier that
matches the identifier in the ID selector.
The id selector prefix has a “#”
An ID selector represents an element instance that has an identifier that
matches the identifier in the ID selector.
The id selector prefix has a “#”
Example
|
Class Selector:
The attribute value must immediately follow the full stop (.).
Example
|
Universal Selector:
The universal selector allows an optional namespace component
ns|*: all elements in namespace ns
ns|*: all elements in namespace ns
*|*: all elements
|*: all elements without a namespace
* : if no default namespace has been specified, this is equivalent to *|*
:lang : the document language specifies how the human language of an element is determined,
Class:target
This kind of URI ends with a “number sign” (#) followed by an anchor identifier
This kind of URI ends with a “number sign” (#) followed by an anchor identifier
Example
|
:root
The :root pseudo-class represents an element that is the root of the document.
The :root pseudo-class represents an element that is the root of the document.
:nth-child()
Selects every p element that is the second child of its parent
Selects every p element that is the second child of its parent
:nth-last-child()
The :nth-last-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings
The :nth-last-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings
:nth-of-type()
Selects every p element that is the second p element of its parent
Selects every p element that is the second p element of its parent
:nth-last-of-type()
Selects every element that is the second p element of its parent, counting from the last child
Selects every element that is the second p element of its parent, counting from the last child
:first-child
The :first-child pseudo-class represents an element that is the first child of some other element.
:last-child
The :last-child pseudo-class represents an element that is the last child of some other element.
The :last-child pseudo-class represents an element that is the last child of some other element.
:first-of-type
its represents an element that is the first sibling of its type in the list of children of its parent element.
its represents an element that is the first sibling of its type in the list of children of its parent element.
: last-of-type
represents an element that is the last sibling of its type in the list of children of its parent element.
represents an element that is the last sibling of its type in the list of children of its parent element.
: only-child
Its represents an element that has a parent element and whose parent element has no other element children.
Its represents an element that has a parent element and whose parent element has no other element children.
: only-of-type
Represents an element that has a parent element
Represents an element that has a parent element
:empty
Its represents an element that has no children at all
Its represents an element that has no children at all
Example
|
REFERENCES
CSS3 REFERENCE
CSS3 PROPETY GROUP
The transition shorthand property combines the four properties described above into a single property.
Background property:
Background
Background-clip
Background-origin
Background-size
Border
Text
Font
Color
2D/3D Transform
Transition
Animation
Box
Background-clip
Background-origin
Background-size
Border
Text
Font
Color
2D/3D Transform
Transition
Animation
Box
Linebox
Flexible Box
Hyperlink
Grid
Multi-column
User-interface
Marqee
Genrated content
Paged Media
Content paged Media
Ruby
speech
Flexible Box
Hyperlink
Grid
Multi-column
User-interface
Marqee
Genrated content
Paged Media
Content paged Media
Ruby
speech
USER INTERFACE
The features of the CSS3 user Interface resizing element, box-sizing, and outlining
Property:
• Resize
• Box-sizing
• Outlining
• Resize
• Box-sizing
• Outlining
Resize Property:
This property provides a mechanism for controlling the appearance of a scrolling mechanism.
This specification adds to that a mechanism for controlling user resizability of elements.
This property provides a mechanism for controlling the appearance of a scrolling mechanism.
This specification adds to that a mechanism for controlling user resizability of elements.
Property:
Resize: The resize property allows the author to specify whether or not an element is resizable by the user
Resize: The resize property allows the author to specify whether or not an element is resizable by the user
Example
|
Box-sizing:
The box-sizing property allows you to define certain elements to fit an area in a certain way
The box-sizing property allows you to define certain elements to fit an area in a certain way
Example
|
OUTLINE PROPERTY
Outline do not take up space
Outline may be not rectangular
Outline may be not rectangular
Property:
Outline
Outline-width
Outline-style
Outline-color
Outline-offset
Outline
Outline-width
Outline-style
Outline-color
Outline-offset
Example
|
No comments:
Post a Comment