Set a close button for the Div.

Source: Internet
Author: User

It's hard to build wheels.

Using the components provided by the framework, it is difficult to make a pseudo-component one day (or add new functionality to a page effect created by others). So, when you meet, you must make the next record. For future inspection.

, the Close button in the top right corner of the popup div is the one I added this time. Audience master may wonder, the original design did not close the button, design unreasonable AH. The original design did not. I have to have this experience.

The page is the Easyui used. The window that pops up doesn't work, and the customer doesn't like the effect. The div that pops up is a div written by the developer himself.

Add the button with the following code:

<div id= "AA" style= "z-index:9001;" ><a id= "BB" href= "javascript:void (0)" class= "Panel-tool-close bb-icon-close" ></A><TABLE> </table></div>

Css

. bb-icon-close {position:absolute;display:inline-block;margin:4px 0 0 280px;width:16px;height:16px;line-height: 15px;cursor:pointer;text-decoration:underline;vertical-align:top;text-align:left;}

The. Panel-tool-close is the Esayui style. is the picture of the Close button.

. Bb-icon-close is modeled after the Easyui example, a little bit debugged out. Except "margin:4px 0 0 280px;" It's a flaw that deserves to be hammered out. Others can be reused directly.

The first three sentences are the most important, position:absolute;     Display:inline-block; margin:4px 0 0 280px;

About Absolute, Mu class online has a video, explain very thorough. can go to study.

Set a close button for the 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.