Home >Web Front-end >CSS Tutorial >How to use css border-right-width property
css border-right-width attribute definition and usage
In css, the border-right-width attribute is used to set the right side of an element Border width, this property can be used when we want to adjust the width of the right border of an element individually (note: before using the border-right-width property to set the border width of an element, the right border (border-right-style property) must be defined) , otherwise there will be no border width if there is no border, and the border-right-width attribute will have no effect).
css border-right-width property syntax format
css syntax: border-right-width: thin / medium / thick / length / inherit
JavaScript syntax: object.style.borderRightWidth="thin / medium / thick / length / inherit"
css border-right-width property value description
thin: Set the right border to small
medium: Set the right border to medium (default)
thick: Set the right border to thick
length: Customize the width of the right border (For example: 10px;)
inherit: Inherit the right border width from the parent element
Example
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>css border-right-width设置右边框宽度属性笔记</title> <style type="text/css"> body{background: #ddd;font-size:20px;} #a,#b,#c,#d{margin-top:10px;width:300px;border-right-style:solid;} #a{border-right-width:thin;} #b{border-right-width:thick;} #c{border-right-width:8px;} </style> </head> <body> <div id = "a">thin:设置右边框为细小的;</div> <div id = "b">thick:设置右边框为粗大的;</div> <div id = "c">自定义右边框的宽度为8px;</div> </body> </html>
Running result
The above is the detailed content of How to use css border-right-width property. For more information, please follow other related articles on the PHP Chinese website!