如何为CSS中的下拉菜单设置超时

时间:2015-05-01 04:08:06

标签: html css asp.net c#-4.0 webforms

我创建了一个名为结果分析的Webform。形式分为课程明智和主题明智 当用户将鼠标光标移动到主题上时,出现下拉列表(B.E,M.C.A,M.B.A和M.Tech)。当用户将光标移动到B.E时,出现B.E(AU,CS,EC,ME,CV,..)下的下一个下拉列表。
我的问题是我无法在B.E下拉菜单中选择除第一个选项之外的选项。一旦我尝试将鼠标光标移动到其他选项上,显示屏就会消失 如何设置时间(如1秒,以便下拉菜单可见1秒),允许用户选择其他选项。

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <link rel = "StyleSheet" href = "StyleSheet.css" />
    </head>
    <body>
        <form id="form1" runat="server">
        <div style="height: 398px">

            <br />
                                                                                                           
            <asp:Label ID="Label1" runat="server" Font-Size="XX-Large" 
                Text="Result Analysis"></asp:Label>
            <br />
            <br />
       
            <asp:Panel ID="Panel1" runat="server" 
                style="z-index: 1; left: 41px; top: 100px; position: absolute; height: 56px; width: 1050px">
                <ul id = "Result">

        <li class = "Size" style="margin-removed 33px; width: 162px;"> Course Wise
        <ul>
                <li class = "SizeSmall">B.E
                <ul>
                <li><asp:LinkButton ID = "LinkButton3" runat = "server" Width = "20%">AU</asp:LinkButton></li>
                <li><asp:LinkButton ID = "LinkButton4" runat = "server" Width = "20%">CS</asp:LinkButton></li>
                <li><asp:LinkButton ID = "LinkButton5" runat = "server" Width = "20%">CV</asp:LinkButton></li>
                <li><asp:LinkButton ID = "LinkButton6" runat = "server" Width = "20%">EC</asp:LinkButton></li>
                <li><asp:LinkButton ID = "LinkButton7" runat = "server" Width = "20%">IS</asp:LinkButton></li>
                <li><asp:LinkButton ID = "LinkButton8" runat = "server" Width = "20%">IP</asp:LinkButton></li>
                <li><asp:LinkButton ID = "LinkButton9" runat = "server" Width = "20%">ME</asp:LinkButton></li>
                </ul>
                </li>
                <li class = "SizeSmall"><asp:LinkButton ID = "LinkButton10" runat = "server"> MCA</asp:LinkButton></li>
                <li class = "SizeSmall"><asp:LinkButton ID = "LinkButton11" runat = "server"> MTech</asp:LinkButton></li>
                <li class = "SizeSmall"><asp:LinkButton ID = "LinkButton12" runat = "server"> MBA</asp:LinkButton>.</li>
         </ul>
         </li>
            <li class = "Size" style="width: 231px; margin-removed 33px"> Subject Wise</li>
        </ul>
                <br />
                <br />
            </asp:Panel>

            <asp:Panel ID="Panel2" runat="server" 
                style="z-index: 1; left: 10px; top: 174px; position: absolute; height: 19px; width: 1089px">
            </asp:Panel>

        </div>
        </form>
    </body>
    </html>

div ul ul 
{
    display: none;
}
div ul li:hover &gt; ul 
{
    display: block;
}
div ul li ul:hover &gt; ul 
{
    display: block;
}
.TextAlign
{
    text-align : center;
}
.Position
{
     position : relative;
     float : left;
     list-style : none;
}   
#Result ul
{
    list-style: none;
}
#Result {
    float: left;
    z-index: 1;
    left: 225px;
    top: 0px;
    position: absolute;
    height: 37px;
    width: 466px;
}
#Result &gt; li {
    float: left;
}
.Size
{
    font-size :x-large;
}
.SizeSmall
{
    font-size : large;
}

以下是结果分析网络表单的屏幕截图:

ScreenShot

0 个答案:

没有答案