CSS Surfacing Common Writing

Source: Internet
Author: User

Example 1

The code is as follows Copy Code

<div class= "Poptip" >
<span class= "Poptip-arrow poptip-arrow-top" ><em> </em><i> </i></span>
<span class= "Poptip-arrow poptip-arrow-right" ><em> </em><i> </i></span>
<span class= "Poptip-arrow poptip-arrow-bottom" ><em> </em><i> </i></span>
<span class= "Poptip-arrow poptip-arrow-left" ><em> </em><i> </i></span>
Hi, did you see it? <br> This is commonly used to the surface of the wording!
</div>

The above HTML forms a surface and four sharp corners, in fact, you only need one span tag, so the real use of the code is not so much.

Css

The code is as follows Copy Code

* Poptip * *
. poptip{position:absolute;top:20px;left:20px;padding:6px 10px 5px;*padding:7px 10px 4px;line-height:16px;color: # Db7c22;font-size:12px;background-color: #FFFCEF; border:solid 1px #FFBB76; border-radius:2px;box-shadow:0 0 3px #ddd;}
. poptip-arrow{position:absolute;overflow:hidden;font-style:normal;font-family:simsun;font-size:12px; text-shadow:0 0 2px #ccc;}

. Poptip-arrow Em,.poptip-arrow I{position:absolute;left:0;top:0;font-style:normal;
. Poptip-arrow em{color: #FFBB76;}
. Poptip-arrow I{color: #FFFCEF; text-shadow:none;}

. poptip-arrow-top,.poptip-arrow-bottom{height:6px;width:12px;left:12px;margin-left:-6px;}
. poptip-arrow-left,.poptip-arrow-right{height:12px;width:6px;top:12px;margin-top:-6px;}

. Poptip-arrow-top{top: -6px;
. poptip-arrow-top em{top: -1px;}
. Poptip-arrow-top i{top:0px;}

. Poptip-arrow-bottom{bottom: -6px;
. Poptip-arrow-bottom em{top: -8px;}
. Poptip-arrow-bottom i{top: -9px;}

. poptip-arrow-left{left:-6px;}
. Poptip-arrow-left em{left:1px;}
. Poptip-arrow-left i{left:2px;}

. poptip-arrow-right{right:-6px;}
. Poptip-arrow-right em{left:-6px;}
. Poptip-arrow-right i{left:-7px;}

This code is compatible with ie6-10, Chrome, Firefox and so on basically all mainstream browsers, so don't worry about its compatibility and practicality

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.