Get the App
SLTechnology News&Howtos  ›  Development  › 

How to specify the width of the CSS border

Shulou Source: shulou.com Published: 2022-06-01 05:27:55 11月13日 Update

In this article Xiaobian for you to introduce in detail "how to specify the width of the CSS frame", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to specify the width of the CSS frame" can help you solve your doubts.

You can specify a width for the border through the border-width property.

There are two ways to specify a width for a border: you can specify a length value, such as 2px or 0.1m, and you may use one of three link words, which are thin, medium (default), and thick.

It shows that CSS does not define the specific width of the three key words, so one user agent may set the division of thin, medium and thick to be 5px, 3px and 2px, while the other user agent may set the equipment to 3px, 2px and 1px separately.

So, how can we set the width of the rig frame:

P {border-style: solid; border-width: 5px;}

Major points:

P {border-style: solid; border-width: thick;} defines unilateral width

You can configure the borders of an element according to the rules of top-right-bottom-left:

P {border-style: solid; border-width: 15px 5px 15px 5px;}

The following example can also be abbreviated as (how to describe it as value replication):

P {border-style: solid; border-width: 15px 5px;} read here, this article "how to specify the width of the CSS frame" article has been introduced, want to master the knowledge of this article also need everyone to practice and use to understand, if you want to know more related articles, welcome to follow the industry information channel.

Tags: Width borders articles content furnishings users appropriate examples elements writing can be passed important attributes ideas new knowledge ways more steps links crux Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Huawei Microsoft Shulou Information MariaDB