Home >Web Front-end >CSS Tutorial >How to add a lower border to an image in css

How to add a lower border to an image in css

王林
王林Original
2020-11-13 17:48:083429browse

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;].

How to add a lower border to an image in css

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn