Answers for "box shadow on one side"

CSS
0

one-sided box shadow css

.myDiv
{
  border: 1px solid #333;
  width: 100px;
  height: 100px;

  /* offset-x | offset-y | blur-radius | spread-radius | color */
  box-shadow: 10px 0 5px -2px #888;

  /* 
     Position the shadow on the side of the element
     that you want it to be, then add a negative spread radius
  */
}
Posted by: Guest on October-28-2020
0

boxshadow one side

.top-box
{
    box-shadow: inset 0 7px 9px -7px rgba(0,0,0,0.4);
}
.left-box
{
    box-shadow: inset 7px 0 9px -7px rgba(0,0,0,0.4);
}
.right-box
{
    box-shadow: inset -7px 0 9px -7px rgba(0,0,0,0.4);
}
.bottom-box
{
    box-shadow: inset 0 -7px 9px -7px rgba(0,0,0,0.4);
}
Posted by: Guest on July-27-2021

Browse Popular Code Answers by Language