![]()
- <div class="triangle">div>
-
- .triangle {
- width: 0;
- height: 0;
- border-left: 50px solid transparent;
- border-right: 50px solid transparent;
- border-top: 14rpx solid red;
- }
- .arrow {
- width: 0;
- height: 0;
- border: 50px solid transparent;
- border-right: 50px solid red;
- transform: rotate(45deg);
- }
- .arrow {
- position: relative;
- }
- .arrow:before {
- content: "";
- position: absolute;
- top: 0;
- left: 0;
- width: 0;
- height: 0;
- border-top: 50px solid transparent;
- border-bottom: 50px solid transparent;
- border-right: 50px solid red;
- }
- .arrow {
- width: 100px;
- height: 100px;
- background-color: red;
- clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
- }