dash border
时间: 2023-09-13 14:14:02 浏览: 55
Dash border refers to a border style that consists of a series of dashes or dotted lines. It is often used to add a decorative or visual element to an object or design. In CSS, you can create a dash border using the "border-style" property with the value "dashed" or "dotted". Here's an example:
```
border: 2px dashed black;
```
This will create a 2-pixel-wide dash border with black dashes on a white background. You can adjust the thickness of the border, the color of the dashes, and the spacing between them by modifying the values in this property.
相关问题
poi BorderStyle
poi BorderStyle是Apache POI库中的一个枚举类型,用于表示单元格边框的样式。它包括以下常量:
- BORDER_NONE:无边框
- BORDER_THIN:细边框
- BORDER_MEDIUM:中等边框
- BORDER_DASHED:虚线边框
- BORDER_DOTTED:点状边框
- BORDER_THICK:粗边框
- BORDER_DOUBLE:双线边框
- BORDER_HAIR:细直线边框
- BORDER_MEDIUM_DASHED:中等虚线边框
- BORDER_DASH_DOT:点划线边框
- BORDER_MEDIUM_DASH_DOT:中等点划线边框
- BORDER_DASH_DOT_DOT:双点划线边框
- BORDER_MEDIUM_DASH_DOT_DOT:中等双点划线边框
- BORDER_SLANTED_DASH_DOT:斜点划线边框
这些常量可以用于设置单元格边框的样式。例如,可以使用以下代码将单元格的边框设置为粗边框:
```
CellStyle style = workbook.createCellStyle();
style.setBorderTop(BorderStyle.BORDER_THICK);
style.setBorderBottom(BorderStyle.BORDER_THICK);
style.setBorderLeft(BorderStyle.BORDER_THICK);
style.setBorderRight(BorderStyle.BORDER_THICK);
cell.setCellStyle(style);
```
poi borderstyle
POI(Apache POI - the Java API for Microsoft Documents)是一个用于读写Microsoft Office格式文件的Java API。BorderStyle是POI中的一个枚举类型,用于设置单元格边框的样式。BorderStyle包括以下几种类型:
- NONE:无边框
- THIN:细边框
- MEDIUM:中等边框
- DASHED:虚线边框
- DOTTED:点状边框
- THICK:粗边框
- DOUBLE:双线边框
- HAIR:头发边框
- MEDIUM_DASHED:中等虚线边框
- DASH_DOT:点划线边框
- MEDIUM_DASH_DOT:中等点划线边框
- DASH_DOT_DOT:双点划线边框
- MEDIUM_DASH_DOT_DOT:中等双点划线边框
- SLANTED_DASH_DOT:倾斜点划线边框
可以通过CellStyle.setBorderTop、CellStyle.setBorderBottom、CellStyle.setBorderLeft、CellStyle.setBorderRight方法来设置单元格的边框样式。例如,设置单元格左边框为粗边框可以使用以下代码:
```
CellStyle style = workbook.createCellStyle();
style.setBorderLeft(BorderStyle.THICK);
cell.setCellStyle(style);
```
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)