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

王林
Release: 2020-11-13 17:48:08
Original
3444 people have browsed it

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;
  }
Copy after login

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;
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template