- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Selectors
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Border Block
- CSS - Border Inline
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursor
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS - Inline Block
- CSS - Dropdowns
- CSS - Visibility
- CSS - Overflow
- CSS - Clearfix
- CSS - Float
- CSS - Arrows
- CSS - Resize
- CSS - Quotes
- CSS - Order
- CSS - Position
- CSS - Hyphens
- CSS - Hover
- CSS - Display
- CSS - Focus
- CSS - Zoom
- CSS - Translate
- CSS - Height
- CSS - Hyphenate Character
- CSS - Width
- CSS - Opacity
- CSS - Z-Index
- CSS - Bottom
- CSS - Navbar
- CSS - Overlay
- CSS - Forms
- CSS - Align
- CSS - Icons
- CSS - Image Gallery
- CSS - Comments
- CSS - Loaders
- CSS - Attr Selectors
- CSS - Combinators
- CSS - Root
- CSS - Box Model
- CSS - Counters
- CSS - Clip
- CSS - Writing Mode
- CSS - Unicode-bidi
- CSS - min-content
- CSS - All
- CSS - Inset
- CSS - Isolation
- CSS - Overscroll
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - Pointer Events
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - Max Block Size
- CSS - Min Block Size
- CSS - Mix Blend Mode
- CSS - Max Inline Size
- CSS - Min Inline Size
- CSS - Offset
- CSS - Accent Color
- CSS - User Select
- CSS Advanced
- CSS - Grid
- CSS - Grid Layout
- CSS - Flexbox
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Paged Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS - Image Sprites
- CSS - Important
- CSS - Data Types
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS - Rounded Corner
- CSS - Border Images
- CSS - Multi Background
- CSS - Color
- CSS - Gradients
- CSS - Box Shadow
- CSS - Box Decoration Break
- CSS - Caret Color
- CSS - Text Shadow
- CSS - Text
- CSS - 2d transform
- CSS - 3d transform
- CSS - Transition
- CSS - Animation
- CSS - Multi columns
- CSS - Box Sizing
- CSS - Tooltips
- CSS - Buttons
- CSS - Pagination
- CSS - Variables
- CSS - Media Queries
- CSS - Functions
- CSS - Math Functions
- CSS - Masking
- CSS - Shapes
- CSS - Style Images
- CSS - Specificity
- CSS - Custom Properties
- CSS Responsive
- CSS RWD - Introduction
- CSS RWD - Viewport
- CSS RWD - Grid View
- CSS RWD - Media Queries
- CSS RWD - Images
- CSS RWD - Videos
- CSS RWD - Frameworks
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
CSS - border-top-left-radius Property
CSS border-top-left-radius property controls the roundness of the top-left corner of an element's border.
Possible Values
<length>: Size of circle radius is denoted, using length values. Negative values are not valid.
<percentage>: Size of circle radius is denoted, using percentage values.
Horizontal axis percentage is referred to the width of the box.
Vertical axis percentage is referred to the height of the box.
Negative values are not valid.
Applies to
All the HTML elements, except for table and inline-table elements with border-collapse set to collapse. Applies to ::first-letter.
DOM Syntax
object.style.borderTopLeftRadius = "length";
If you set the border-top-left-radius property on an element, and then set the border-radius property on the same element, the border-top-left-radius property will be reset to its initial value.
CSS border-top-left-radius - <length> Value
Here is an example of how to create top-left rounded corner using length value −
<html> <head> <style> .rounded-border { background-color: pink; border: 3px solid green; border-top-left-radius: 50px; background-size: 100% 100%; width: 200px; height: 200px; } </style> </head> <body> <div class="rounded-border"> top-left rounded corner. </div> </body> </html>
CSS border-top-left-radius - <percentage> Value
Here is an example of how to create top-left rounded corner using percentage value −
<html> <head> <style> .rounded-border { background-color: pink; border: 3px solid green; border-top-left-radius: 25%; background-size: 100% 100%; width: 200px; height: 200px; } </style> </head> <body> <div class="rounded-border"> top-left rounded corner. </div> </body> </html>
CSS border-top-left-radius - With Animation
Here is an example of how to create a top-left rounded corner with an animation −
<html> <head> <style> .rounded-border { background-color: pink; border: 3px solid green; background-size: 100% 100%; width: 200px; height: 200px; animation: animatedRadius 5s infinite; } @keyframes animatedRadius { 50% { border-top-left-radius: 100px; } } </style> </head> <body> <div class="rounded-border"> top-left rounded corner with animation. </div> </body> </html>
CSS border-top-left-radius - With Different Shapes
The following example demonstrates how to use the border-top-left-radius property to create different types of rounded corner −
<html> <head> <style> .rounded-box { width: 150px; height: 150px; background-color: pink; border: 3px solid green; margin: 10px; } .rounded-box.circle-arc { border-top-left-radius: 35px; } .rounded-box.ellipse-arc { border-top-left-radius: 75px 35px; } .rounded-box.square-per { border-top-left-radius: 30%; } .non-square-per { border-top-left-radius: 30%; width: 200px; height: 100px; background-color: pink; border: 3px solid green; margin: 10px; } </style> </head> <body> <h3>Different shapes using border-top-left-radius property</h3> <div class="rounded-box circle-arc"> Arc of an circle. </div> <div class="rounded-box ellipse-arc"> Arc of an ellipse. </div> <div class="rounded-box square-per"> Square element with % radius. </div> <div class="non-square-per"> Non-square element with % radius. </div> </body> </html>
CSS border-top-left-radius - With Image
The following example demonstrates how to create a top-left rounded corner image using border-top-left-radius property −
<html> <head> <style> .img-border-radius { background-image: url(images/tree.jpg); border-top-left-radius: 6em; background-size: 100% 100%; width: 200px; height: 200px; } </style> </head> <body> <div class="img-border-radius"> top-left rounded corner image. </div> </body> </html>