Home > Article > Web Front-end > How to add a lower border to an image in css
How to add lower borders to images in css: You can use the border-top attribute and border-bottom attribute to add upper and lower borders, such as [border-bottom:thick dotted;border-top:thick double;].
border-bottom shorthand property sets all properties of the bottom border into one statement.
(Learning video sharing: css video tutorial)
border-bottom-width Specifies the width of the bottom border.
border-bottom-style Specifies the style of the bottom border.
border-bottom-color Specifies the color of the bottom border.
Example:
p { border-style:solid; border-bottom:thick dotted #ff0000; }
border-top shorthand attribute sets all the attributes of the top border into one statement.
border-top-width Specifies the width of the top border.
border-top-style Specifies the style of the top border.
border-top-color Specifies the color of the top border.
Example:
p { border-style:solid; border-top:thick double #ff0000; }
Related recommendations: CSS tutorial
The above is the detailed content of How to add a lower border to an image in css. For more information, please follow other related articles on the PHP Chinese website!