
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
How to Animate Bullets in Lists using CSS
To style bullets in an unordered list, we can use the list-style por
Syntax
The syntax of CSS li-style property as follows −
li { list-style: /*value*/ }
Example
The following examples illustrate CSS li-style property.
<!DOCTYPE html> <html> <head> <style> li { margin: 3px 0; padding: 2%; width: 28%; line-height: 1.2%; list-style: none; border-radius: 5% 0 0 5%; box-shadow: -10px 2px 4px 0 chartreuse; color: cornflowerblue; } li:hover { box-shadow: -10px 2px 4px 0 blue!important; font-size: 1.4em; } </style> </head> <body> <ul> <li>a</li> <li>b</li> <li>c</li> <li>d</li> </ul> </body> </html>
This gives the following output
Example
<!DOCTYPE html> <html> <head> <style> ol { list-style: none; counter-reset: li; overflow: hidden; } li { margin-right: 10%; padding: 2%; width: 15%; float: left; line-height: 1.2%; font-weight: bold; counter-increment: li; box-shadow: inset 2px 14px 10px lightblue; } li:hover { box-shadow: inset 6px 14px 10px lightgreen!important; font-size: 1.4em; } li::before { content: counter(li); color: seagreen; display: inline-block; width: 40%; margin-left: -2em; } </style> </head> <body> <ol> <li>a</li> <li>b</li> <li>c</li> </ol> </body> </html>
This gives the following output
- Related Articles
- How to animate buttons using CSS?
- How to create an unordered list without bullets using CSS?
- Create a bordered list without bullets using CSS
- Animate CSS outline
- How to animate scrollLeft using jQuery?
- Formatting Unordered and Ordered Lists Using CSS
- Animate bottom CSS property
- Animate CSS flex property
- Animate CSS border property
- Animate CSS height property
- Animate CSS margin property
- Animate CSS right property
- Animate CSS order property
- Animate CSS outline-width
- Animate CSS outline-color

Advertisements