CSS Next Steps

Alpha Channel

Sets the Opacity for a color.

alpha range
rgba (255, 255, 255, 0.3)
OR
background-color: # ff ff ff ff;

Note :-
♠ In rgba alpha value varies from "0 to 1".
♠ In hexcode alpha value varies from "00 to ff"

Opacity

Sets the Opacity for the element.

alpha range
opacity: 0.5;

CSS Transitions

Transitions enable you to define the transition between two states of an element.

Transition

Transition has 4 Property :-

Transition Short-hand :

Transition: transition-property transition-duration transition-timing-function transition-delay;

Transition Shorthand
transition: margin-top 2s ease-in-out 0.2s;
Example :
index.html
html_file
style.css
css_file
Output :
This is an Example div.

CSS Transform

This property lets you rotate, scale, move, skew, or translate an element. This allows us to change the shape, size, and position of an element without disturbing the other elements around it.

Animation

To animate CSS elements

Syntax

@Keyframe myName {
  from {font-size: 20px;}
  to {font-size: 20px;}
}

Animation Properties

Animation Shorthand

animation: name duration timing-function delay iteration-count direction;

% in CSS Animation

@keyframe myName {
  0% {font-size: 20px;} //animation at 0% stage.
  50% {font-size: 30px;} //animation at 50% stage.
  100% {font-size: 40px;} //animation at 100% stage.

Box Shadow

It adds shadow effects around an element's frame.
Syntax :- box-shadow: x-offset y-offset Blur-Radius color;

box-shadow: x-offset y-offset Blur-Radius Spread-radius color;

box shadow syntax
box-shadow: 2px 2px 2px green;
OR
box-shadow: 2px 2px 2px 5px green;

Background

The background property in CSS is used to set the background of an element. You can control the background's color, image, position, size, and more.

Background Properties :-

background Properties

Background Short-hand:

background: color | image | position / size | repeat;

Position

♠ The position CSS property sets how an element is positioned in a document.
♠ the top, right, bottom and left properties determine the final location of positioned elements.

Practice file is given below:-

CLICK HERE

Card Hover Effect Practice :

CLICK HERE

Creating a 'Simple Smiley face' for practice:

CLICK HERE