Get the App
SLTechnology News&Howtos  ›  Development  › 

How to draw triangles with linear-gradient in css

Shulou Source: shulou.com Published: 2022-06-01 03:09:53 09月22日 Update

This article will explain in detail how css uses linear-gradient to draw triangles. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Use linear-gradient to draw triangles

Div {width: 100px; height: 100px; background: linear-gradient (45deg, deeppink, deeppink 50%, transparent 50%, transparent 100%);}

This is the end of this article on "how css uses linear-gradient to draw triangles". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Tags: Triangles articles more good practical content articles knowledge references help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Tech Info Docker MariaDB Huawei