Prasath V Prasath V - 2 months ago 17
CSS Question

How to add customized box shadow

I just want box shadow like in the design below image

enter image description here

And i have tried the following code for all

box-shadow: inset 0 0px 2px rgba(0,0,0,.39);


But the output was look like

enter image description here

I have changed the box shadow values can't get the exact ouput. Anyone help this.. Thanks.

Answer

better you use the -webkit-box-shadow, -moz-box-shadow& box-shadow for the better output.

input{
  width:100px;
  padding:15px;
  -webkit-box-shadow: inset 0px 2px 15px -5px rgba(0,0,0,0.39);
-moz-box-shadow: inset 0px 2px 15px -5px rgba(0,0,0,0.39);
box-shadow: inset 0px 2px 15px -5px rgba(0,0,0,0.39);
}
<input type="text" />