宽高不确定时自定义边框
效果:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>border-image-slice</title> <style> .arrow { border-image-source: url('./img/arrow.png'); border-image-slice: 23 13 23 13 fill; border-top: 23px solid; border-right: 13px solid; border-bottom: 23px solid; border-left: 13px solid; /* 宽高可以随便修改 */ height: 500px; width: 26px; } </style> </head> <!-- 类似点9图,宽高不确定时自定义边框 --> <body> <div class="arrow"></div> </body> </html>
标签:slice,自定义,solid,image,宽高,border From: https://www.cnblogs.com/ximu1009/p/17926286.html