Black technology from Netease cloud, div with sharp corners..., and div with sharp corners .....
Today, I heard a song in NetEase cloud's web edition, saying that Steve Vai's song will always be so hard to understand, but I still prefer old Joe, Jack, and I ran my question ···
You can see the comment input box and reply box. There is a small tip above, and there are many implementation methods. I generally use border to do this, you just need to add these four attributes to an element:
Border-top: 400px solid red; border-right: 400px solid transparent; border-bottom: 400px solid transparent; border-left: 400px solid transparent;
Next we will talk about the black technology on the cloud of Netease. After reading it, I really want to become a server ···
As a programmer, reading web pages always likes the review elements of the handcuffs...
Why? What are the two black blocks? For a moment, it turned out to be like this ....
The color of the small square on the top layer is the white background color, and a small square with the background color as the border color is stacked below, which is relatively intuitive:
Here there are two small blocks, both of which are position: absolute; move the small block on the right to the left and immediately overwrite the square on the left:
OK, just like this. You may already know what this is. Assuming that the background color is white and the border is red, then we only need to change the color attribute of the two elements:
We only need to give the parent element position: relative; it's okay to locate the two small blocks to the corresponding place. I feel that people who can think of this method are also very good, aha.