Implement the div tips layer and div tips on the page

Source: Internet
Author: User

Implement the div tips layer and div tips on the page
<Style>
/* Implement the prompt box */
. W {width: 200px; position: relative; background: #999; left: 70%; top: 10px; font-size: 12px; text-align: left}
. X {width: 180px; position: relative; background: # ff9; border: 1px solid # F96; padding: 10px; left:-4px; top:-4px ;}
. Y,. z {position: absolute; left: 130px ;}
. Y {color: # ff9; top:-6px ;}
. Z {color: # f96; top:-7px ;}
. Close
{
Width: 50px; position: absolute; left: 95%; top: 1px; cursor: pointer;
}
/*
Principle of shadow simulation:
1. Use a layer as the background layer, and fill the background color with the shadow color.
2. Place the target layer in the background layer. The target layer is as big as the background layer. In this way, the target layer completely hides the background layer. In this case, you only need to set the target layer to relative positioning. Make it deviate from the original position left and top each-4px to simulate the shadow. Of course, it is not necessarily-4, it can be another value.
How to simulate a triangle:
1. First, we noticed "& #9670". This value is displayed as a diamond on the webpage. & #9670.
2. The diamond is composed of two triangles. We set two diamond to absolute positioning. The color of the diamond below is the border color of the content div. The color of the above diamond is the content color of the content div. In this way, as long as the two diamond shapes differ by one pixel in the position, that is, the top of the following diamond on the webpage is a pixel smaller than the top one on the top, the border is simulated.
*/

</Style>


<Div class = "w" id = "tips">
<Div class = "x"> tips: the selection of medical institutions and chronic diseases in the chronic disease approval function is integrated into the selection of chronic diseases. Click "select chronic diseases" to try.
<Div class = "z" >&# 9670 </div>
<Div class = "y" >&# 9670 </div>
<Div class = "close" onclick = "javascript: $ get ('tids '). style. display = 'none' "> </div>
</Div>
</Div>




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.