The border attribute is used as a small symbol, and the border is used as a small symbol.

Source: Internet
Author: User

The border attribute is used as a small symbol, and the border is used as a small symbol.

Two days ago, I found a small symbol on the website and thought it was an inserted img, but I found no img address. Finally, I asked the students to learn that the border attribute was used.

Symbol, such as right:

The css code is as follows:

. Fuhao {position: absolute; top: 12px; left: 12px; width: 0px; height: 0px; overflow: hidden; border-width: 6px 0px 6px; border-color: transparent # A92222; border-style: dashed none dashed solid ;}

Here we use an empty div, namely fuhao, to define its position, so that its height and width are both 0, but the border has width. Then there is nothing in this div, only the border is left.

In principle, it should be like this:

Then the following statement transparently processes the upper and lower borders, and 0px processes the right border to obtain the symbol.

In fact, I don't quite understand it, but I think it is very interesting to use the border as a symbol. Let's just get what we get.

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.