Course Content
Introduction
Introduction to CSS course
0/1
CSS Syntax
0/1
CSS Selectors
0/1
CSS Unit of Measurements
CSS units are used to specify measurements for various properties such as length, width, margin, padding, font size, and more.
0/1
CSS Colors
CSS provides various ways to specify colors.
0/2
CSS Properties And Values
0/1
CSS Background
0/1
CSS Box Model
0/1
CSS Display
CSS display property is used to control how an element is displayed on the webpage.
0/3
Typography and Font Properties
0/1
CSS Display And Positioning
0/2
Responsive Design with CSS Media Queries
0/1
About Lesson

CSS Filters and Blending Modes:

CSS filters and blending modes are two additional tools that can be used to add visual effects to elements on a web page.

CSS filters allow for a variety of image effects to be applied to an element, such as blurring, color manipulation, and grayscale. Filters are applied using the filter property and can be combined with other CSS properties such as background-color and opacity to create more complex effects.

Here are some examples of common CSS filters:

  • Blur: Blurs an element

div {

  filter: blur(5px);

}

  • Grayscale: Converts an element to grayscale

div {

  filter: grayscale(100%);

}

  • Sepia: Applies a sepia tone to an element

div {

  filter: sepia(100%);

}

  • Invert: Inverts the colors of an element

div {

  filter: invert(100%);

}

CSS blending modes, on the other hand, allow for two or more overlapping elements to be blended together. Blending modes are applied using the mix-blend-mode property and can be used to create a variety of effects such as overlays and color adjustments.

Here are some examples of common CSS blending modes:

  • Overlay: Overlays one element onto another.

div {

  mix-blend-mode: overlay;

}

  • Color Burn: Darkens the base color to reflect the blend color

div {

  mix-blend-mode: color-burn;

}

  • Luminosity: Maintains the luminosity of the base color while applying the hue and saturation of the blend color.

div {

  mix-blend-mode: luminosity;

}

CSS filters and blending modes can be used to add a wide range of visual effects to web pages, from simple color adjustments to complex image manipulations. When used effectively, they can help to create more visually engaging and dynamic user experiences.