Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> CSS

CSS से चेकमार्क/टिक कैसे बनाएं?

हम CSS का उपयोग करके एक कस्टमाइज़्ड चेकमार्क बना सकते हैं। निम्न उदाहरण इस प्रभाव को दर्शाते हैं:

उदाहरण 1 (प्सूडो-एलिमेंट से)

<!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>

आउटपुट

यह निम्न परिणाम उत्पन्न करेगा:

CSS से चेकमार्क/टिक कैसे बनाएं?

उदाहरण 2 (बॉर्डर ट्रिक)

<!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>

आउटपुट

यह निम्न परिणाम उत्पन्न करेगा:

CSS से चेकमार्क/टिक कैसे बनाएं?

  1. CSS से नोट्स कैसे बनाएं? CSS से नोट्स कैसे बनाएं?

    CSS से नोट्स बनाने के लिए, कोड निम्नानुसार है -<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style>    body{       font-family: 'Segoe UI', Tahoma, Geneva, Verdana

  1. CSS से तीर कैसे बनाएं? CSS से तीर कैसे बनाएं?

    CSS से तीर बनाने के लिए, कोड निम्नानुसार है -उदाहरण<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style>    body {       font-family: "Segoe UI", Tahoma, Geneva

  1. CSS से 4-कॉलम लेआउट ग्रिड कैसे बनाएं? CSS से 4-कॉलम लेआउट ग्रिड कैसे बनाएं?

    उदाहरण CSS से 4-कॉलम लेआउट ग्रिड बनाने के लिए, निम्न कोड का उपयोग करें: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style>    body {       font-family: "Segoe UI&