Beautiful pop-up window

Source: Internet
Author: User
First, make a simple Prompt window. Compile HTML code and put all the prompt window content in a span object.

Place the cursor in <a href = "#" class = "tip"> CSS <SPAN class = "popbox"> here, put an image Cascading Style Sheet in the stacked style sheet </span> </ a>
A prompt box is displayed on this hyperlink.

Then, display the content with CSS.

A. Tip {
Color: red;
Text-Decoration: none;
Position: relative;
}
A. Tip. popbox {
Display: none;
}
A. Tip: hover {
Cursor: pointer;/* because IE does not fully support hover pseudo objects, you can set cursor: pointer to display it normally */
}
A. Tip: hover. popbox {
Display: block;
Position: absolute;
Top: 15px;
Left:-30px;
}

To place the prompt window on the side of the content explained, you must set the tip to relative positioning: Position: relative; then set the span object to absolute positioning, position: absolute ;.
Normally, use display: none; To hide the image. Because IE does not fully support hover, you must specify cursor: pointer in A: tip: hover.
(The website layout is recorded in the "cursor: Hand" file. It can be displayed normally, but this attribute was not found in dreamweaver8 at the time)

A. Tip: hover. popbox {
Display: block;
Position: absolute;
Top: 15px;
Left:-30px;
}

With the preceding settings, the cursor is displayed when you place the cursor over the hyperlink.

Next, create a complex image with a background and put an image.

To display irregular images, you must first create an irregular and compliant image as the background, you need to make the part without any image into a transparent background (Photoshop processing is good ).

Rewrite the following CSS code:

A. Tip: hover. popbox {
Display: block;
Position: absolute;
Top:-240px;
Left:-30px;
Width: 226px;
Height: 242px;
Color: #000000;
Background-image: url('background image .gif ');
Background-repeat: No-Repeat;
}

Otherwise, when the image is inserted in dreamweaver8', the URL ('background image .gif ') does not have single quotation marks, which cannot be normally displayed in Firefox.
In addition, the repeat mode is set to no-repeat, and the relative position is set as required.

Modify the content in the span and add the image information.

Place the cursor in <a href = "#" class = "tip"> CSS <SPAN class = "popbox"> here, put an image <br/> Cascading Style Sheet </span> </a>
A prompt box is displayed on this hyperlink.

Set the border of the image so that the display in Firefox and IE is the same.

For the final and code, see

Http://www.mxstdio.cn/example/poptip/index.html

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.