css做三角形
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <style> div{ width:0; height:0; border:5px solid; /*注:border-color中,设置了颜色那个边框就是三角形的底边框*/ border-color: transparent red transparent transparent; } </style> </head> <body> <div></div> </body> </html>