- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Create a Checkmark / Tick with CSS
We can create a customized checkmark using CSS. The following examples illustrate this effect −
Example
<!DOCTYPE html> <html> <style> div { margin: 2%; position: relative; width: 40px; height: 40px; box-shadow: inset 0 0 12px lightblue; } div::before { content: ""; position: absolute; width: 8px; top: 50%; height: 50%; border-radius: 2px; background-color: rgb(123,45,20); transform: translateX(12px) rotate(-45deg); transform-origin: left bottom; z-index: +1; } div::after { content: ""; position: absolute; bottom: 0; height: 8px; width: 100%; border-radius: 2px; background-color: rgb(200,52,120); transform: translateX(12px) rotate(-45deg); transform-origin: left bottom; } </style> <body> Custom mark! <div></div> </body> </html>
Output
This will produce the following result −
Example
<!DOCTYPE html> <html> <style> body { padding: 2%; text-align: center; } div { display: inline-block; height: 100px; width: 35px; border-bottom: 10px solid chartreuse; border-right: 10px solid chartreuse; transform: rotate(45deg); } </style> <body> <div></div> </body> </html>
Output
This will produce the following result −
Advertisements