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

JavaScript में इमेज बॉर्डर की चौड़ाई कैसे सेट करें?

अवलोकन

इमेज बॉर्डर की चौड़ाई सेट करने के लिए borderImageWidth प्रॉपर्टी का उपयोग करें।

उदाहरण

<!DOCTYPE html> <html>    <head>       <style>          div {             background-color:gray;             border: 40px solid;             border-image: url('https://www.tutorialspoint.com/images/neo4j.png');             border-image-slice: 50;             border-image-width: 20px;             border-image-width: 1 1 1 1;             border-image-outset: 0;             border-image-repeat: round;          }       </style>    </head>    <body>       <div id="box">          <p>Demo Text!</p>       </div>       <button onclick="display()">Set Width</button>       <script>          function display(){             document.getElementById("box").style.borderImageWidth = "20px 30px";          }       </script>    </body> </html>
  1. - जावास्क्रिप्ट के साथ लेफ्ट बॉर्डर का रंग कैसे सेट करें?

    जावास्क्रिप्ट में लेफ्ट बॉर्डर का रंग सेट करने के लिए, borderLeftColor प्रॉपर्टी का उपयोग करें। इस प्रॉपर्टी पर वह रंग सेट करें जो आप बॉर्डर के लिए चाहते हैं। उदाहरण लेफ्ट बॉर्डर का रंग सेट करना सीखने के लिए निम्न कोड चलाकर देखें: <!DOCTYPE html> <html>    <head>  

  1. - JavaScript से इमेज की चमक और कंट्रास्ट कैसे सेट करें?

    उदाहरण CSS filter प्रॉपर्टी से brightness() और contrast() फंक्शन का उपयोग करें। <!DOCTYPE html> <html> <body> <p>इमेज की चमक और कंट्रास्ट बदलने के लिए नीचे क्लिक करें।</p> <button onclick=display()>इमेज संपादित करें</button><br><br>

  1. - JavaScript से लिस्ट-आइटम मार्कर के रूप में इमेज कैसे सेट करें?

    उदाहरण listStyleImage प्रॉपर्टी से कस्टम इमेज को लिस्ट मार्कर के रूप में उपयोग करें। <!DOCTYPE html> <html> <body> <ol id=myID> <li>एक</li> <li>दो</li> </ol> <button type=button onclick=display()>लिस्ट इमेज अपडेट क