效果圖如下:
邊框樣式實現一個三角形,具體代碼如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>css實現三角形</title>
<style>
*{
*margin*: 0;
*padding*: 0;
}
.con{
*height*: 800px;
*background-color*: #eeeeee;
}
.box{
*width*: 0px;
*height*: 0px;
*border-top*: 10px red solid;
*border-left*: 10px transparent solid ;
*border-right*: 10px transparent solid;
}
</style>
</head>
<body>
<div class="con">
<div class="box"></div>
</div>
</body>
</html>
如果感覺對自己有幫助,麻煩點一下關注,會一直和大家分享知識的,謝謝!!!