CSS | stroke-miterlimit Property
The stroke-miterlimit property is used to represent the limit on the ratio of the miter length to the stroke-width, that is used to draw a miter join. This property is used in situations when the miter extends beyond the thickness of the line. If this limit specified is exceeded, the ‘miter’ type of the join is converted to ‘bevel’.
This will crop the connecting point perpendicular to the join, instead of a sharp join.
Syntax:
stroke-miterlimit: number|initial|inherit
Property Values:
- number: It is used to define the ratio limit. It can be any value greater than or equal to 1. The default value is 4.
Example 1:
<!DOCTYPE html><html><head><title>CSS | stroke-miterlimit property</title><style>rect {stroke-linejoin: miter;stroke-width: 20px;stroke: green;fill: none;}</style></head><body><h1style="color: green">GeeksforGeeks</h1><b>CSS | stroke-miterlimit</b><p>Each angle of the square is of 90 degrees.Increasing the miterlimit progressivelyconverts the miter joints to bevel ones.</p><divclass="container"><svgwidth="500px"height="200px"version="1.1"><rectx="50"y="20"width="100"height="100"stroke-miterlimit=1/><textx="40"y="150">stroke-miterlimit: 1</text><rectx="250"y="20"width="100"height="100"stroke-miterlimit=2/><textx="240"y="150">stroke-miterlimit: 2</text></svg></div></body></html>Output:

Example 2:
<!DOCTYPE html><html><head><title>CSS | stroke-miterlimit property</title><style>polygon {stroke-linejoin: miter;stroke-width: 8px;stroke: green;fill: none;}</style></head><body><h1style="color: green">GeeksforGeeks</h1><b>CSS | stroke-miterlimit</b><p>Each of the triangles have two anglesequal to 24 degrees and one angleequal to 130 degrees. Increasing themiterlimit progressively converts themiter joints to bevel ones.</p><divclass="container"><svgwidth="500px"height="200px"version="1.1"><polygonpoints="20, 20 150, 20 85, 80"stroke-miterlimit=1/><textx="30"y="100">stroke-miterlimit: 1</text><polygonpoints="170, 20 300, 20 235, 80"stroke-miterlimit=2/><textx="180"y="100">stroke-miterlimit: 2</text><polygonpoints="320, 20 450, 20 385, 80"stroke-miterlimit=3/><textx="330"y="100">stroke-miterlimit: 3</text></svg></div></body></html>Output:

- initial: It is used to set the property to its default value.
- inherit: It is used to set the property to inherit from its parent element.
Supported Browsers: The browsers supported by stroke-miterlimit property are listed below:
- Google Chrome
- Firefox
- Opera
- Internet Explorer 9


