1. Rendering JD Effect Simulation Effect 2. Principle Prepare a box with height and width of 0 Set a border around this box Replace the unnecessary borders with If you need to change its size, just set the border width Set the Finally, use positioning to set it to the desired position 3. Code HTML Structure <div class="square"> <p class="triangle"></p> </div> CSS Styles .square { position: relative; width: 400px; height: 200px; background: green; margin: 150px auto; } .triangle { position: absolute; top: -40px; left: 50%; margin-left: -20px; width: 0; height: 0; border-style: solid; border-width: 20px; border-color: transparent transparent red transparent; font-size: 0; line-height: 0; } This is the end of this article about CSS chat bubbles. For more relevant CSS chat bubbles content, please search 123WORDPRESS.COM’s previous articles or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! |
<<: MySQL 5.7 Common Data Types
>>: Linux checkup, understand your Linux status (network IO, disk, CPU, memory)
Table of contents Problem Description The general...
Html code: Copy code The code is as follows: <t...
/****************** * Advanced character device d...
There are 4 commonly used methods, as follows: 1....
In the process of designing a web page, designers...
The specific code of JavaScript date effects is f...
Table of contents 1. Install Docker 2. Install an...
Preface To solve the single point of failure, we ...
I have summarized 3 methods to deploy multiple fr...
border-radius:10px; /* All corners are rounded wi...
Delete a file by its inode number First use ls -i...
Preface A requirement I had previously made, to s...
Table of contents 1. Background running jobs 2. U...
A story about database performance During the int...
Some of you may have heard that the order of trav...