Css Notes
Css Notes
FLEX-DIRECTION :
flex-direction: row|row-reverse|column|column-reverse
Justify content :
The CSS justify-content property defines how the browser
distributes space between and around content items along the
main-axis of a flex container,
This is a shorthand for the flex-direction and flex-wrap properties, which together
define the flex container’s main and cross axes. The default value is row nowrap.
FLEX WRAP :
By default, flex items will all try to fit onto one line. You can
change that and allow the items to wrap as needed with this
property.
wrap: flex items will wrap onto multiple lines, from top to
bottom.
Order Property :
> The order CSS property sets the order to lay out an item in
a flex.
Syntax : order: 5;
ALIGN-SELF :
It makes possible to override the align-items value for specific flex
items(child).
FLEX-GROW :
This property specifies how much of the remaining space in the
flex container should be assigned to the item (the flex grow
factor).
FLEX-SHRINK:
It specifies the “flex shrink factor”, which determines how much
the flex item will shrink relative to the rest of the flex items in the
flex container when there isn’t enough space on the row.
---------------------------------------------------------------------------------------
------
MediaQueries :
Media queries are useful when you want to modify your site or
app depending on a device's general type (such as print vs.
screen) or specific characteristics and parameters (such as
screen resolution or browser viewport width).
CSS ANIMATIONS :
>CSS animations make it possible to animate transitions from one CSS style
configuration to another.
animation-name
animation-duration
Configures the length of time that an animation should take to complete one
cycle.
animation-timing-function
Configures the timing of the animation; that is, how the animation transitions
through keyframes, by establishing acceleration curves.
animation-delay
Configures the delay between the time the element is loaded and the beginning
of the animation sequence.
animation-iteration-count
Configures the number of times the animation should repeat; you can specify
infinite to repeat the animation indefinitely.
animation-direction
Configures whether or not the animation should alternate direction on each run
through the sequence or reset to the start point and repeat itself.
animation-fill-mode
Configures what values are applied by the animation before and after it is
executing.
Pseudo class is a selectors [in pseudo class there only one :] is a
keyword added to a selector
{ Property:value;}
- AN OBJECT CAN CHANGE THE ORIGINAL FORM TO DESIRE FORM THIS IS CALLED AS
TRANSFORMATION.
<!DOCTYPE html>
<html>
<head>
<style>
div.a {
width: 150px;
height: 80px;
background-color: yellow;
transform: rotate(20deg);
div.b {
width: 150px;
height: 80px;
background-color: yellow;
transform: skewY(20deg);
div.c {
width: 150px;
height: 80px;
background-color: yellow;
transform: scaleY(1.5);
</style>
</head>
<body>
<h2>transform: rotate(20deg):</h2>
<br>
<h2>transform: skewY(20deg):</h2>
<br>
<h2>transform: scaleY(1.5):</h2>
</body>
</html>
TRANSFORM-ORIGIN
Note: This property must be used together with the transform property.
Syntax: transform-origin:value;
1.center
2.bottom right
3.bottom left
4.top left
5.top right
TRANSITION
A transition occurs when a CSS property changes from one value to another value over
a period of time.
transition-property Specifies the name of the CSS property the transition effect is for
transition-duration Specifies how many seconds or milliseconds the transition effect takes to
complete
TRANSLATE
Tip: You need to define a value for CSS perspective property for the z-property
to take effect.