MyBlogHelp– A Blog for Digital Marketing, Affiliate Marketing, Organic Lead Generation.
  • Home
  • About
  • Contact
  • Privacy
  • Sitemap
  • BLOG
  • AFFILIATE MARKETING
    • LeadsArk
  • MORE
    • MAKE MONEY
      • ONLINE BUSINESS
      • ADSENSE
      • AFFILIATE MARKETING
    • BLOGGING
      • SEO
      • BlogSpot
      • WORPRESS
      • GOOGLE
      • COMPUTER TIPS
    • WEB DESIGN
      • HTML
      • CSS
      • BOOTSTRAP
      • JAVASCRIPT
      • JQUERY
    • WEB DESIGN
      • HTML
      • CSS
      • BOOTSTRAP
      • JAVASCRIPT
      • JQUERY
    • WEB DEVELOPMENT
      • PHP
      • WORDPRESS
  • DOWNLOADS
    • Blogger Template
    • Wordpress Theme
    • PDF

Friday, April 26, 2019

How to use css box-shadow property? CSS Tutorial 19

 MyBlogHelp     April 26, 2019     css     No comments   

css box-shadow property

 

  CSS box-shadow property

  1. Introduction to CSS box-shadow property
  2. Syntax of the CSS box-shadow property
  3. Example of the CSS box-shadow property

Introduction to CSS box-shadow Property

Box-shadow property is used to create a shadow of the box. By creating a shadow of any box, you can create attractive effects and bring that box into focus. You can create the shadow of any color and any width in any side of the box.

Whenever box term is used in the context of any HTML element, It means that the border, margin, padding, and content of the element.

Every HTML element is like a box. The box has some default border, margin, and padding that can be changed. The actual content is inside the box. This is called a CSS box model.

Normally when you look at any HTML element, it does not look like a box. But when a border of that element is defined, then it looks like a box.

To design the CSS box model, you can use borders, backgrounds, margins, and paddings of different colors and shapes. Apart from these, there is another property available in CSS by which you can create a shadow of any box.

Syntax of the CSS box-shadow Property

The general syntax of the CSS box-shadow property is given below.

      box-shadow: horizontalShadow verticalShadow blur width color; 

As you can see in the above syntax, there are five values of the box-shadow property. These are given below.

  • horizontalShadow - By this value, you can define that the shadow will be in the left or right. When this value is in positive then the shadow is shown in right and when it is in negative, the shadow is shown in the left. The more you increase or decrease this value, the more shadow grows in the left and right. You can give this value in pixels.
  • verticalShadow - With this value, you can define that the shadow will be in the top or in the bottom. When this value is positive then the shadow is shown on the bottom side and when it is negative, the shadow is displayed on the top side. This value is also given in pixels.
  • blur - With this value, you can define how sharp or blurred you want to see the shadow. When you define this value by 0 or negative, the shadow looks sharp like a border.
  • width - With this value, you can define what the width of the shadow will be.
  • color - With this value, you define the color of the shadow.

Example of the CSS box-shadow Property

Example of CSS box-shadow property has been given below.

<!DOCTYPE html>
<html>
<head>
<title> CSS box-shadow Property Example </title>
<style>
h1
{
    box-shadow: 5px 5px 5px 5px red;
    width: 40%;
    height: auto;
    margin: 50px;
    text-align: center;
}
</style>
</head>
<body>

<h1> My Blog Helps </h1>
</body>
</html>

The above example will produce the below output.


CSS-box-shadow-property-example



         <<-- PREVIOUS                                                                                                 NEXT -->>









  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Thank you for reading this post. Please do not enter any spam link in the comment box.

Followers

Blog Archive

  • ►  2020 (4)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
  • ▼  2019 (52)
    • ►  December (1)
    • ►  November (2)
    • ►  October (1)
    • ►  August (1)
    • ►  July (1)
    • ►  May (11)
    • ▼  April (10)
      • How to use css box-shadow property? CSS Tutorial 19
      • How to use css z-index property? CSS Tutorial 18
      • How to use css outline property? CSS Tutorial 17
      • How to use css attribute selector? CSS Tutorial 16
      • How to use the css float property? CSS Tutorial 15
      • How to use the css visibility property? CSS Tutori...
      • How to use css cursor property? CSS Tutorial 13
      • How to use css display property? CSS Tutorial 12
      • How to use css position property? CSS Tutorial 11
      • How to use css overflow property? CSS Tutorial 10
    • ►  March (6)
    • ►  February (3)
    • ►  January (16)
  • ►  2018 (54)
    • ►  December (27)
    • ►  November (5)
    • ►  May (5)
    • ►  April (4)
    • ►  February (3)
    • ►  January (10)
  • ►  2017 (17)
    • ►  December (9)
    • ►  November (8)

Popular Posts

  • How to use the main tag in html5?
  • How to use keygen tag in html5?
  • How to use html5 mark tag to highlight text?
  • How to start Online Business without money from home?
  • What is a search engine?

Contact Us

Name

Email *

Message *

About MyBlogHelp

Most of the posts, we share on this blog related to Affiliate Marketing, Organic Lead Generation, Digital Marketing, Social Media Marketing, Make Money Online, SEO, and web design.

Featured Post

LeadArk - Affiliate Marketing | Qualified Organic Lead Generation | LeadsArk Review

Copyright © MyBlogHelp– A Blog for Digital Marketing, Affiliate Marketing, Organic Lead Generation.
Design by Md. Abdussamad | MyBlogHelp.com