CSS sprites example
How do I make an css sprites example?
What is a css sprites example? How do you make a css sprites example? This script and codes were developed by Massimo Cassandro on 09 November 2022, Wednesday.
CSS sprites example - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS sprites example</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>CSS Sprites Example</h1>
<h2>Sprite image:</h2>
<p><img src="https://primominuto.altervista.org/articoli/17/imgs/sprite_image.png" alt="sprite image"></p>
<h2>List with sprite icons</h2>
<ul> <li class="icon square">Lorem ipsum dolor</li> <li class="icon triangle">Consectetur adipisicing elit</li> <li class="icon star">Ipsa, nemo, maxime</li> <li class="icon circle">Officia sunt voluptatem</li> <li class="icon pentagon">Consequatur odit eveniet</li> <li class="icon diamond">Tempore possimus sit eos</li>
</ul>
</body>
</html>
CSS sprites example - Script Codes CSS Codes
body { background-color: #fff; font-size: 16px;
}
h2 { margin-top:2em; font-size: 2em
}
img { border: 1px solid #ccc;
}
ul { list-style-type: none; margin-left: 2em;
}
li { position: relative; font-size: 2em; margin-top: 1em;
}
.icon::before { content: ''; position: absolute; left: -50px; width: 40px; height: 40px; display: block; background-image: url(https://primominuto.altervista.org/articoli/17/imgs/sprite_image.png); background-repeat: no-repeat; margin: 0 2em 2em 0;
}
.square::before { background-position: 0 0;
}
.triangle::before { background-position: -92px 0;
}
.star::before { background-position: -184px 0;
}
.circle::before { background-position: 0 -86px;
}
.pentagon::before { background-position: -93px -86px;
}
.diamond::before { background-position: -184px -86px;
}
Developer | Massimo Cassandro |
Username | massimo-cassandro |
Uploaded | November 09, 2022 |
Rating | 3 |
Size | 1,940 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
SVG embedding methods | 2,734 Kb |
Grumpicon demo | 3,038 Kb |
Nested table email layout | 2,355 Kb |
Google maps circle method | 2,285 Kb |
JQuery UI Datepicker | 2,506 Kb |
JQuery UI Autocomplete for Bootstrap | 4,368 Kb |
Colspan auto | 1,368 Kb |
SVG symbols demo | 3,246 Kb |
Checkbox with SVG icon | 4,376 Kb |
SVG example | 2,119 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Kevin | Kevinkenger | 2,642 Kb |
Filtre ile Arama Kutusu - Search Box with Filter | AyhanALTINOK | 3,448 Kb |
Hexagons | Ashmind | 4,360 Kb |
NeeilTimer | Neeilan | 2,836 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
A vuejs widget | Chrgl86 | 2,869 Kb |
Template | Indra_z85 | 2,323 Kb |
Save for later... | Victorfreire | 1,359 Kb |
Webkit decolorize | Fivera | 1,675 Kb |
Mandelbrot Fractal | _Billy_Brown | 2,706 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!