Black technology from Netease cloud, div with sharp corners..., and div with sharp corners .....

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.