box shadow js code example

Example 1: css box shadow

/* offset-x | offset-y | blur-radius | spread-radius | color */
box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);

Example 2: css shadow

.yourElement {
  /* offset-x | offset-y | blur-radius | spread-radius | color */
  -webkit-box-shadow: -2px -1px 15px 7px rgba(0,0,0,0.5);
  -moz-box-shadow: -3px -2px 30px 14px rgba(0,0,0,0.425);
  box-shadow: -4px -3px 45px 21px rgba(0,0,0,0.35);
}

Example 3: box shadow css

box-shadow: 3px 3px 6px 5px #ccc;

or

box-shadow: 0px 5px 17px -7px rgba(0, 0, 0, 0.75);

Example 4: box shadow javascript style change

document.getElementById("myDIV").style.boxShadow = "10px 20px 30px blue";

Example 5: box shadow css

#Box-shadow-example {
Box-shadow:0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}
<!-- offset-x, offset-y, (blur-radius and/or spread-radius=optional) and color-->

Example 6: css box shadow

/*// https://html-css-js.com/css/generator/box-shadow
--------------------------------------------------------------*/
-webkit-box-shadow: 5px 5px 15px 5px #000000;
   -moz-box-shadow: 5px 5px 15px 5px #000000;
		box-shadow: 5px 5px 15px 5px #000000;

/*//        offset-x | offset-y | blur-radius | spread-radius | color
box-shadow: 5px        5px       15px           5px             #000000;
--------------------------------------------------------------*/

Tags:

Misc Example