Today we will introduce several ways to use CSS to write a top-left triangle. Schematic diagram (taking 60px width and height as an example): This kind of triangle can generally be used as the lower left foot of "dialog box" type graphics. The first one: #triangle-topleft { border: 30px solid #e6686e; height: 0; width: 0; border-right-color: transparent; border-bottom-color: transparent; } Second type: #triangle-topleft { width: 0; height: 0; border-top: 60px solid #e6686e; border-right: 60px solid transparent; } The third type: #triangle-topleft { border: 60px solid transparent; width: 0; height: 0; border-left-color: #e6686e; border-top-width: 0; } You can try more different triangle methods and triangles in different directions. Here is a highly recommended website that showcases commonly used CSS graphics: https://css-tricks.com/the-shapes-of-css/ The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: Optimizing query speed of MySQL with tens of millions of data using indexes
>>: Web page layout should consider IE6 compatibility issues
Verification environment: [root@~~/]# rpm -qa | g...
When it comes to pictures, the first thing we thi...
From getting started to becoming a novice, the Li...
Why beautify the file control? Just imagine that a...
When using a docker container, sometimes vim is n...
New Questions Come and go in a hurry. It has been...
Table of contents verify: Combined with the examp...
Copy code The code is as follows: <html> &l...
I have just started using react to do projects, a...
Table of contents Methods of String Object Method...
view What is a view? What is the role of a view? ...
Enable remote access Enable remote access rights ...
Introduction After compiling, installing and solv...
Table of contents Preface Virtual DOM What is Vir...
This article shares the specific code of jQuery t...