绘制正三角形
主要是利用border属性,设置内容区宽高值为0
将其下边设置为可见,其他边设为透明
想要倒三角形也是一样,只要设置上边可见,其他边透明即可
代码区:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>绘制特殊图形</title>
<style>
/*绘制正三角形
主要是利用border属性,设置内容区宽高值为0
将其下边设置为可见,其他边设为透明
想要倒三角形也是一样,只要设置上边可见,其他边透明即可 */
.one{
width: 0;
height: 0;
/* border-top: 50px solid red; */
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 50px solid blue;
text-align: center;
}
/* 绘制梯形
设置100的宽度 */
.two{
wid