Skip to content

Buzzingz

Unleashing the Power of Code

  • HTML
  • CSS
  • JavaScript
  • Toggle search form

CSS Shadow Effects

Posted on March 20, 2023April 1, 2023 By shani No Comments on CSS Shadow Effects

CSS Shadow Effects are a way to add visual depth and texture to elements on a webpage.

CSS provides four properties to create shadow effects

  1. box-shadow: This property adds a shadow to the entire box surrounding an element. It takes values for horizontal offset, vertical offset, blur radius, and spread distance, followed by the color of the shadow.

Example:

div {
  box-shadow: 2px 2px 10px 0px rgba(0,0,0,0.5);
}
  1. text-shadow: This property adds a shadow to the text inside an element. It takes values for horizontal offset, vertical offset, blur radius, and color of the shadow.

Example:

h1 {
  text-shadow: 2px 2px 2px rgba(0,0,0,0.5);
}
  1. inset: This property creates an inset shadow instead of a drop shadow.

Example:

button {
  box-shadow: inset 2px 2px 10px 0px rgba(0,0,0,0.5);
}
  1. filter: This property applies visual effects like blurring and color shifting to an element. The drop-shadow() filter function can be used to create a drop shadow effect on an element. It takes values for horizontal offset, vertical offset, blur radius, and color of the shadow.

Example:

img {
  filter: drop-shadow(2px 2px 10px rgba(0,0,0,0.5));
}
CSS Tags:CSS Shadow

Post navigation

Previous Post: CSS Gradients
Next Post: JavaScript Tutorial: A Comprehensive Guide for Beginners

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CSS Tutorial

  • Basic CSS Tutorial For Beginners
  • CSS Introduction
  • CSS Syntax
  • CSS Selectors
  • How To Add CSS
  • CSS Comments
  • CSS Colors
  • CSS Backgrounds
  • CSS Borders
  • CSS Margins
  • CSS Margin Collapse
  • CSS Padding
  • CSS Height, Width and Max-width
  • CSS Box Model
  • CSS Outline
  • CSS Text
  • CSS Fonts
  • CSS Web Safe Fonts
  • CSS Font Fallbacks
  • CSS Font Style
  • CSS Font Size
  • CSS Google Fonts
  • CSS Great Font Pairings
  • CSS Icons
  • CSS Links
  • CSS Lists
  • CSS Tables
  • CSS Layout – display: inline-block
  • CSS Layout – float and clear
  • CSS Layout – Horizontal & Vertical Align
  • CSS Layout – Overflow
  • CSS Layout – The display Property
  • CSS Layout – The z-index Property
  • CSS Layout – width and max-width
  • CSS Layout – The position Property
  • CSS Attribute Selectors
  • CSS Image Sprites
  • CSS Image Gallery
  • CSS Dropdowns
  • CSS Horizontal Navigation Bar
  • CSS Vertical Navigation Bar
  • CSS Navigation Bar
  • CSS Opacity / Transparency
  • CSS Pseudo-elements
  • CSS Pseudo-classes
  • CSS Combinators
  • CSS Math Functions
  • CSS The important Rule
  • CSS Specificity
  • CSS Units
  • CSS Website Layout
  • CSS Counters
  • CSS Forms
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms & Conditions

Copyright © 2023 Buzzingz.

Powered by PressBook WordPress theme