25
loading...
This website collects cookies to deliver better user experience
box-shadow
and make a light-source and a dark shadow, now you might not understand this by now but you will, when you see how easy the steps are.background-color
in this case I have given rgb(194, 194, 194);
.divs
with different class names.background-color
to the div
tags as the body, which is rgb(194, 194, 194);
.top-left
and making a dark shadow on the bottom-right
box-shadow
is box-shadow: 20px 20px 60px #8d8d8d71, -20px -20px 60px #e0e0e0;
, here the negative values indicate the light-source coming from top-left and the positive values represent the dark-shadow formed at the bottom-right.linear-gradient
to the box which is opposite to the box-shadow
.background-color
and vice-versa on the opposite corner.linear-gradient
are sw apped. top-left
) has a light color and the darker-shadow side (bottom-right
) has a dark color.box-shadow
but on the inner side.box-shadow
on the inner side by using a value called inset
which will help us give the shadow inside.