A developer is tasked with creating a navigation menu where each list item has a custom icon instead of the default marker. How can they achieve this using CSS properties related to list styles?
- list-style-type: none; background-image: url('icon.png'); background-size: 20px 20px; background-repeat: no-repeat; padding-left: 30px;
- list-style-type: none; content: url('icon.png'); padding-left: 30px;
- list-style: none; background-image: url('icon.png'); background-size: 20px 20px; background-repeat: no-repeat; padding-left: 30px;
- list-style-type: none; background: url('icon.png') no-repeat left center; padding-left: 30px;
Option 4 is correct. It sets list-style-type to none and uses a background image for the custom icon, adjusting padding for spacing.
Loading...
Related Quiz
- For smoother transitions, the property will-________ can be used to hint the browser about what aspects of an element will change.
- The cubic-bezier function for animation-timing-function takes in ______ arguments to define the curve.
- When building a theme with interchangeable colors, which approach using CSS or SASS variables would allow the most flexibility for theme variations without changing the underlying structure?
- To create a new styled component based on an existing one, the ________ method can be used in Styled Components.
- What is the purpose of the CSS border-style property?