灰色,网页中更新进度在运行ASP.NET [英] Gray out the webpage during Update progress Runs in ASP.NET

查看:117
本文介绍了灰色,网页中更新进度在运行ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,在那里我已经把一个更新的进展control.I想,作为更新进程启动时,整个页面将显示成灰色出来,因为它完成的页面将恢复到原来的。 下面是codeI已经添加了更新的进展: -

i have a webpage where i had put an update progress control.I want that as the update progress starts, the entire Page will be gray out and as it completes the page will resume to original. Below is the code i had added for Update Progress:-

<div class="divTextAlign">
            <asp:Updateprogress id="updProgress" runat="server" dynamiclayout="true" associatedupdatepanelid="updForgotPassword">
                <Progresstemplate>
                    <img src="App_Themes/Images/ajax-loader.gif" alt="" />
                </Progresstemplate>
        </asp:Updateprogress> 

请让我知道,我怎么变成灰色的页面,如果可能的话请提供code也。 先谢谢了。

Please Let me know that how i gray out the page , If possible please provide the code also . Thanks in advance.

推荐答案

CSS的位可以为你做到这一点 -

A bit of css can do this for you -

aspx页面

<Progresstemplate>
    <div class="overlay"> 
        <img src="App_Themes/Images/ajax-loader.gif" alt="" />
    </div>
</Progresstemplate>

CSS

.overlay 
{
 position: absolute;
 background-color: white;
 top: 0px;
 left: 0px;
 width: 100%;
 height: 100%;
 opacity: 0.8;
 -moz-opacity: 0.8;
 filter: alpha(opacity=80);
 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
 z-index: 10000;
}

您需要将位置设置为相对于容器,也给它一个高度,或设置溢出heighjt相应。然后,还可以样式图像为中心等。

You will need to set the position to relative to the container, and also give it a height, or set the heighjt of the overflow accordingly. You can then also style the image to be centred etc.

这篇关于灰色,网页中更新进度在运行ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆