How to draw a triangle

To draw a triangle using CSS is to make all four sides transparent and then set the color of one side

<style>
	#div1{
		margin:200px auto;
		width:0px;
		height:0px;
		border:solid 100px transparent;
		border-bottom-color:#000000
	}
<style>

<body>
	<div id="div1">
	</div>
<body>
	
Copy the code