Fadeout / Darken background for ModalPopupExtender in ASP

I am currently working on ModalPopupExtender in ASP.net with C #. My modal popup expander works fine, but I'm just wondering if there is a way to darken the background with some kind of animation to make the popup extension more visible.

Is there a jQuery or AJAX form or something that would provide me with such functionality.

Thanks for the help.

+3
source share
1 answer

The CSS class that you attach to the modal popup expander gives the background color.

<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton2" PopupControlID="Panel2" BackgroundCssClass="modalBackground" OkControlID="OkButton1" OnOkScript="onOk()" CancelControlID="CancelButton1" DropShadow="true" PopupDragHandleControlID="Panel4" />

and in my CSS, I

.modalBackground 
{
    height:100%;
    background-color:#EBEBEB;
    filter:alpha(opacity=70);
    opacity:0.7;
}

You can change the above CSS to darker shades of gray if you want. In addition, you can experiment with the properties of alpha and opacity.

+7
source

All Articles