当前位置 : 主页 > 网页制作 > css >

CSS画一个三角形

来源:互联网 收集:自由互联 发布时间:2021-06-13
!DOCTYPEhtml htmllang="en" head metacharset="UTF-8" metaname="viewport"content="width=device-width,initial-scale=1.0" metahttp-equiv="X-UA-Compatible"content="ie=edge" titleDocument/title style .triangle{ width:0; height:0; border-top:50pxs
<!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>         .triangle{             width: 0;             height: 0;             border-top: 50px solid black;             border-right: 50px solid transparent;             border-left: 50px solid transparent;         }     </style> </head> <body>     <div class="triangle"></div> </body> </html>
网友评论