CSS 分割线
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .box{ width: 300px; /* border: 1px solid red; */ } .line{ margin: 20px 0; line-height: 1px; border-left: 50px solid #ddd; border-right: 150px solid #ddd; text-align: center; } </style> </head> <body> <div class="box"> <div class="line"> this is line </div> </div> </body> </html>