I have an element that has inset box shadows, but I want the shadow on only the top.
Is there no way to set only the top shadow? Do I have to resort to creating additional elements to overlay the side shadows?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is technically the same answer as @ChrisJ, with a few more details on how to make
box-shadowdo your bidding:for reference the * items are optional:
The
<spread-radius>needs to be negative<blur-radius>(so that none of the other blurred sides show up), and then you need to bump the<offset-y>down by the same amount:It will give you a single gradient band across the top of the element.