Direction: Choose the correct option
Q1.
What is an image sprite in CSS?
Direction: Choose the correct option
Q2.
.icon {
width: 32px;
height: 32px;
background: url('sprite.png');
}What is the main benefit of using sprites?Direction: Choose the correct option
Q3.
.home-icon { background-position: 0 0; }
.about-icon { background-position: -32px 0; }
.contact-icon { background-position: -64px 0; }How do you display different icons from the same sprite?Direction: Choose the correct option
Q4.
.nav-item {
background: url('nav-sprite.png');
}
.nav-item:hover {
background-position: 0 -40px;
}What effect does this create?Direction: Choose the correct option
Q5.
If icons in a sprite are 50px each and arranged horizontally, what is the background-position for the third icon?
