How would you create a shadow effect that suggests a light source coming from the top right corner of the element?
- box-shadow: -5px -5px 10px #888888;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 5px 5px 10px #888888;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
- box-shadow: 5px 5px 10px #888888;
To create a shadow effect suggesting a top-right light source, you use positive values for the horizontal and vertical offsets in the box-shadow property. This casts a shadow to the bottom right, simulating light from the top right.
Loading...
Related Quiz
- In OOCSS, the concept of separating ________ from ________ helps in creating more reusable and maintainable CSS.
- How do you align the markers (like bullets or numbers) of a list inside or outside the content flow?
- A website has a high First Contentful Paint (FCP) time. What CSS optimization strategy could be most effective in improving this metric?
- A team is working on a large web application and decides to adopt a CSS methodology to maintain consistency and scalability. Which methodology would be most beneficial for a project where modular and reusable components are a priority?
- You need to remove the default bullet points and apply a custom image as the bullet for each list item in an unordered list. How would you achieve this in CSS?