Home > Web Front-end > HTML Tutorial > Explore the use of the border-top attribute in CSS

Explore the use of the border-top attribute in CSS

WBOY
Release: 2016-09-21 13:56:05
Original
1601 people have browsed it

We introduced the usage of the CSS top attribute in the previous section, so it will be easier to learn the usage of the CSS border-top attribute in this section. The border-top abbreviation attribute sets all the attributes of the top border into one statement.

This article describes to you the usage of the CSS border-top property. The border-top abbreviation property sets all the properties of the top border into one statement. I believe that the introduction in this article will definitely help you gain something.

CSS border-top property

Definition and Usage

border-top shorthand property sets all properties of the top border into one statement.

You can set the following properties in order:

border-top-width   
border-top-style   
border-top-color 
Copy after login

If you don’t set one of the values, there will be no problem. For example, border-top:solid #ff0000; is also allowed.

Default value: not specified
Inheritance: no
Version: CSS1
JavaScript syntax: object.style.borderTop="3px solid blue"

Instances

Set the style of the top border:

p  
  {  
  border-style:solid;  
  border-top:thick double #ff0000;  
  }  
Copy after login

 

Browser support

All browsers support border-top property.

Note: The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).

Possible values

Value Description
border-top-width Specifies the width of the top border. See: border-top-width for possible values.
border-top-style Specifies the style of the top border. See: border-top-style for possible values.
border-top-color Specifies the color of the top border. See: border-top-color for possible values.
inherit Specifies that the setting of the border-top attribute should be inherited from the parent element.

Reference reading: http://www.manongjc.com/article/1188.html

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