How to draw the tick symbol using CSS? The symbols I find using Unicode isn't aesthetically-pleasing.
EDIT Icon fonts are a great suggestion. I was looking for something like this.
A checkmark icon can be created with CSS by following these steps : Taking a container element, and using its ::before and ::after pseudo-elements to create two straight lines. Rotate both pseudo-elements to make the element look like a checkmark.
In the web page's HTML source code, add one of the following Unicode HTML entities, depending on the type of check mark you want to insert. ☑ - inserts the " ☑ " symbol. ✓ - adds the " ✓ " symbol. ✔ - inserts the " ✔ " symbol.
You can draw two rectangles and place them next to each other. And then rotate by 45 degrees. Modify the width/height/top/left parameters for any variation.
DEMO 1
DEMO 2 (With circle)
HTML
<span class="checkmark"> <div class="checkmark_stem"></div> <div class="checkmark_kick"></div> </span>
CSS
.checkmark { display:inline-block; width: 22px; height:22px; -ms-transform: rotate(45deg); /* IE 9 */ -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */ transform: rotate(45deg); } .checkmark_stem { position: absolute; width:3px; height:9px; background-color:#ccc; left:11px; top:6px; } .checkmark_kick { position: absolute; width:3px; height:3px; background-color:#ccc; left:8px; top:12px; }
Here is another CSS solution. its take less line of code.
ul li:before { content: '\2713'; display: inline-block; color: red; padding: 0 6px 0 0; } ul li { list-style-type: none; font-size: 1em; } <ul> <li>test1</li> <li>test</li> </ul>
Here is the Demo link http://jsbin.com/keliguqi/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With