<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> div { width: 200px; height: 200px; background-color: pink; /* border: 粗细 线条样式 颜色 -- 不分先后顺序 */ /* solid : 实线 */ /* border: 1px solid #000; */ /* dashed: 虚线 */ /* border: 5px dashed #000; */ /* dotted : 点线 */ /* border: 5px dotted #000; */ border-left: 5px dotted #000; border-right: 5px dotted #000; border-top: 1px solid red; border-bottom: 1px solid red; } </style> </head> <body> <div>内容</div> </body> </html>