Learn how to use CSS box shadow property - Source Code
![](dashboard/uploads/5edc150a2ab983.68661800.jpg)
Make money for being or staying online/internet.
You will get a $50 starting gift when you join using this code: Exode4LKrbujm1z and link:: GET THE OFFER NOW!!
The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas.
A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.
Tutorial.
HTML - Markup
<div class="box-container"> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div>
CSS - Styles
Syntax
/*Syntax*/ box-shadow: horizontal-offset | vertical-offset | blur-radius | Color; /*Example with values*/ box-shadow: 10px 5px 5px black;
The horizontal offset (required) of the shadow, positive means the shadow will be on the right of the box, a negative offset will put the shadow on the left of the box.
The vertical offset (required) of the shadow, a negative one means the box-shadow will be above the box, a positive one means the shadow will be below the box.
The blur radius (required), if set to 0 the shadow will be sharp, the higher the number, the more blurred it will be, and the further out the shadow will extend. For instance a shadow with 4px of horizontal offset that also has a 4px blur radius will be 8px of total shadow.
Color (required) – This takes any color value, like hex, named, rgba or hsla. If the color value is omitted, box shadows are drawn in the foreground color (text color). But be aware, older WebKit browsers (pre Chrome 20 and Safari 6) ignore the rule when color is omitted.
/*Layout style*/ body{ display: flex; flex-direction: column; align-items: center; justify-content: center; } .box-container{ display: flex; flex-wrap: wrap; } /*Layout styles end here*/ /*Box & shadow styles below*/ .box{ height:180px; width:180px; background-color:#00796b; border:2px solid #808080; margin: 0 0 20px 20px; box-shadow: inset 2px 5px 5px rgba(0,0,0,.55),2px 5px 5px rgba(0,128,0,.55); }
To learn more about this css box shadow property visit Developer.mozilla.org
You can also create box shadows easily using this non-profit project, made by developers for developers: CSS Matic Site
Save up to 80% with this Domain & Shared Hosting package deal! 80% OFF - GET OFFER NOW
Related Post(s)
» How do I wrap text in a pre tag?[SOLVED]
» Animated Social Media Icons Using Font Awesome and Materialize CSS
» How To Create A Stacked Gallery Using HTML And CSS Source Code
» Learn how to create a custom scrollbar with CSS.
» Learn how to create Gradient Backgrounds using CSS
collections_bookmark Category :: Cssdate_range Published :: 4 years ago At: 01:13 AM
event_note Detailed Date :: Jun 06th, 2020
person Writer :: Code
- RECENT POSTS
![](dashboard/uploads/63b8963d1bb795.29283300.jpg)
How to force the browser to cache a page?
There are several ways to force a web browser to cache an HTML page:
![](dashboard/uploads/63b8901430e8d8.48487086.jpg)
How can i cache pages using php?
You can use the output buffering functions in PHP to cache pages. Output buffering allows you to store the output of a PHP script in a buffer, which you can then manipulate before sending it to the client.
![](dashboard/uploads/63b88a77505a70.14768322.jpg)
PHP is a popular programming language that is widely used for web development. It stands for "PHP: Hypertext Preprocessor" and is a server-side scripting language. This means that it is executed on the server, rather than in the user's web browser.
![](dashboard/uploads/63b888a29e95e4.17538963.jpg)
HTML, or Hypertext Markup Language, is the standard markup language for creating web pages and web applications. It is used to structure and organize content on the web, and to create the basic structure and layout of a webpage.
![](dashboard/uploads/63b883470d2801.53607033.jpg)
CSS, or Cascading Style Sheets, is a stylesheet language used for describing the look and formatting of a document written in HTML. CSS is used to control the presentation of multiple web pages at once, making it a crucial tool for web developers and designers.
![](dashboard/uploads/60f3fc93cc26b8.61551746.jpg)
A JavaScript library for formatting and manipulating numbers - Numeral.js
Check out this lightweight JavaScript library used for formatting and manipulating numbers.
![](dashboard/uploads/60ccc1dc622254.31295175.jpg)
All Countries Drop Down List | HTML Select Country Name
This simple country dropdown list is freely available for you to copy and use in your project forms.
![](dashboard/uploads/60cb4b9db92e48.06374045.png)
HTML Entities Code Alphabet Discovery Using JavaScript
In this post I will show how writing just a few lines in JavaScript will allow you to render, browse and discover the alphabetical letters using a set of HTML entity codes.
- ADVERTISEMENT