

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 set the shape of the border of the top-left corner with JavaScript?
To set the shape of the border of the top-left corner in JavaScript, use the borderTopLeftRadius property. Set the border radius using this property.
Example
You can try to run the following code to learn how to set the shape of the top-left border with JavaScript −
<!DOCTYPE html> <html> <head> <style> #box { border: thick solid gray; width: 300px; height: 200px } </style> </head> <body> <div id="box">Demo Text</div> <br><br> <button type="button" onclick="display()">Change top left border radius</button> <script> function display() { document.getElementById("box").style.borderTopLeftRadius = "20px"; } </script> </body> </html>
- Related Questions & Answers
- How to set the shape of the border of the top-right corner with JavaScript?
- How to set the shape of the border of the bottom-left corner in JavaScript DOM?
- Set top-left corner border with CSS
- How to set the shape of the border of the bottom-right corner in JavaScript DOM?
- How to set the width of the top border with JavaScript?
- How to set the color of the top border with JavaScript?
- How to set the style of the top border with JavaScript?
- How to set the color of the left border with JavaScript?
- How to set the style of the left border with JavaScript?
- How to set the width of the left border with JavaScript?
- Set top-right corner border with CSS
- Set bottom-left corner border with CSS
- Set the width of the left border using CSS
- How to set the width of the bottom border with JavaScript?
- How to set the style of the bottom border with JavaScript?
Advertisements