Three ways to set borders in HTML border-width: 1px 2px 2px; border-style: solid dashed dotted; border-color:red green blue; /*Set the top→left→bottom borders respectively*/ 1. The composition of the frame: border: 1px solid #fff parameter: The first one is the border thickness 1px The second is the border style solid dashed dotted (not compatible with different browsers) The third is the border color red. Use English words to represent the color directly #f00. The hexadecimal representation of the color is rgb(255,0,0). 2. Composite Style /*border: 1px solid red; /*Compound style*/ 3. Single setting border-width: 1px 2px 2px 1px; border-style: solid dashed dotted solid; border-color:red green blue pink; /*Set the top→right→bottom→left borders respectively*/ This means that the top border, right border, bottom border, and left border are set for the four borders respectively. border-width: 1px 2px; border-style: solid dashed; border-color:red green; /*Set the upper, lower, left and right borders respectively*/ Two values represent: top and bottom borders, left and right borders The three values represent: top border, left border, bottom border (I don’t know why it is divided like this, maybe it is unified) You can also set each border individually! border-top; border-right; border-bottom; border-left; But work should not be so segmented. Because it's not only a lot of work but also weird and unsightly. This concludes this article on the three ways to set HTML borders. For more relevant HTML border settings, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: CSS3 implements the sample code of NES game console
>>: Summary of CSS3 practical methods (recommended)
1. Optimization of commonly used HTML tags HTML s...
<table id=" <%=var1%>">, the...
The installation and configuration method of MySQ...
Table of contents Matlab Centroid Algorithm As a ...
Installation environment: CentOS7 64-bit, MySQL5....
Preface Because the mini program upload requires ...
Table of contents Vue2.x Usage Global Registratio...
1. Use xshell to connect to the virtual machine, ...
To automatically load kernel modules in CentOS, y...
Docker container connection 1. Network port mappi...
MyISAM storage engine The MyISAM storage engine i...
1. Introduction to Middleware 1. Basic concepts E...
Table of contents What is native JavaScript A. Ch...
Nowadays, cross-platform development technology i...
Cell padding is the distance between the cell con...