简体   繁体   English

我的页面没有滚动条

[英]my page doesnt have a scrollbar

i don't know whats wrong but my page doesnt have a scrollbar, when the page exceeds, i cant scroll below it. 我不知道出了什么问题,但是我的页面没有滚动条,当页面超出时,我无法在其下方滚动。 what seems to be the probblem with my code? 我的代码似乎有什么问题?

i am new to ASP.NET so yeah, i do not know much yet. 我是ASP.NET的新手,所以,我还不了解。 thanks in advance! 提前致谢!

here is my full aspx page. 这是我完整的aspx页面。

<form id="form1" runat="server">
    <div style="width:100%;height:100%;overflow:scroll;overflow-y:auto;">
<div class="body">
<div class="pull-right">
            <br />
            <div class ="dropdown" runat="server">
                <asp:Label ID="hideID" runat="server" Text="#" Visible="false"></asp:Label>
                <asp:Label ID="lblLogged" runat="server" CssClass="dropbtn" Text="Name" />
                <div class="dropdown-content">
                    <asp:LinkButton ID="btnMain" runat="server" OnClick="btnMain_Click">Main Menu</asp:LinkButton>
                    <asp:LinkButton ID="btnLogO" runat="server" OnClick="btnLogO_Click">Log Out</asp:LinkButton>
                    <%--<a id="btnLogOut" runat="server" href="LogIn.aspx">Log Out</a>--%>
                </div>
            </div>

<%-- Current User: <%-当前用户: --%> -%>

and here is my CSS, i dont know if its correct 这是我的CSS,我不知道它是否正确

<style type="text/css">
     .*{
         width:auto;
         height:auto;
         overflow-y: hidden;
         overflow:auto;
     }

    .body{
        position:absolute;
        left:24%;
        width:800px;
        height:400px;
        z-index:0;  

    }
    .home{
        position:absolute;
        top: 200px;
        left: 38%;
        z-index: 2;
    }
    .yusenlogo{
        position:center;
        left:40%;
    }
    .exist{
        position:absolute;
        height:10%;
        width:40%;
        top: 250px;
        left: 30%;
        z-index: 2;
        background-color: darkred;
        border-top:5px;
    }
    .added{
        position:absolute;
        height:8%;
        width:40%;
        top: 250px;
        left: 30%;
        z-index: 2;
        background-color: forestgreen;
        border-top:5px;
    }
    .well2 {
        position:absolute;
        width:40%;
        top: 310px;
        left: 30%;
        z-index: 2;
        min-height: 20px;
        padding: 19px;
        margin-bottom: 20px;
        /*background-color: #f5f5f5;*/
        /*border: 1px solid #e3e3e3;*/
        border-radius: 4px;
        /*-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);*/
        }
    .well3 {
        position:absolute;
        width:70%;
        top: 80px;
        left: 13%;
        z-index: 2;           
    }
    .buttons{
        cursor:default;
    }
    .banner{
        position:absolute;
        top: 50%;
        left: 50%;
        z-index:2;
    }
    .character{
        position:absolute;
        height:60px;
        width:40%;
        top: 250px;
        left: 30%;
        z-index: 2;
        background-color: darkred;
        border-top:5px;
    }

    .lowerleft {
        position: fixed;
        bottom:8px;
        left:16px;
        width:100%;
    }

    .lowerleftuser {
        position: fixed;
        bottom:8px;
        left:16px;
        width:100%;
        z-index:1000;
    }
    .forGridView {
        position:fixed;
        top:30%;
        left:30%;
        z-index:1000;
    }
    .container {
         width:auto;
         height:auto;
         overflow-y: hidden;
         overflow:auto;
    }

    .dropbtn {
        background-color: cornflowerblue;
        color: white;
        padding: 12px;
        font-size: 13px;
        border: none;
        cursor: pointer;
    }


    .dropdown {
        position: relative;
        display: inline-block;
    }


    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #f9f9f9;
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    }


    .dropdown-content a {
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
    }


    .dropdown-content a:hover {background-color: #f1f1f1}


    .dropdown:hover .dropdown-content {
        display: block;
    }


    .dropdown:hover .dropbtn {
        background-color: cornflowerblue;
    }
    #txtFrom
    {
        background-image: url(Images/Calendar2.png);
        background-position: right;
        background-repeat: no-repeat;
        /*padding: 3.5px 10px;*/
        padding: 6px 12px;
        line-height: 1.428571429;
        color: #555555;
        vertical-align: middle;
        background-color: #ffffff;
        border: 1px solid #cccccc;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
        transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    }
    #txtTo
    {
        background-image: url(Images/Calendar2.png);
        background-position: right;
        background-repeat: no-repeat;
        padding: 6px 12px;
        line-height: 1.428571429;
        color: #555555;
        vertical-align: middle;
        background-color: #ffffff;
        border: 1px solid #cccccc;
        border-radius: 4px;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
        -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
        transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
    }

</style>  

In your CSS: 在您的CSS中:

.*{
     width:auto;
     height:auto;
     overflow-y: hidden;
     overflow:auto;
 }

remove "overflow-y: hidden;" 删除“ overflow-y:隐藏;”

overflow-y is the vertical scrollbar, this CSS is suppressing it, see http://www.w3schools.com/cssref/css3_pr_overflow-y.asp for more information. overflow-y是垂直滚动条,此CSS禁止使用它,有关更多信息,请参见http://www.w3schools.com/cssref/css3_pr_overflow-y.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我的堆栈跟踪不包含最初调用它的页面? - Why doesnt my stack trace include the page that it was originally called from? 页面滚动条窗口8 - Page scrollbar windows 8 WindowsAppSDK 没有 ProtocolActivatedEventArgs - WindowsAppSDK doesnt have ProtocolActivatedEventArgs C#-如何设置我的Datagrid enabled = false,并且仍然具有滚动条而不使用readonly()? - C# - How can I set my Datagrid enabled = false and still have a scrollbar without using readonly()? Dropdown.SelectedIndex在Page_Load事件中没有正确的值,但在Render事件中具有正确的值 - Dropdown.SelectedIndex doesnt have the correct value in the Page_Load event, but has the correct value in the Render event 我的页面似乎没有让我对服务文件方法进行ajax调用 - My page doesnt seem to let me do ajax calls to my service files methods 我的哈希表不起作用 - My hashtable doesnt work wpf:垂直滚动条工作正常,但水平滚动条不工作 - wpf: vertical scrollbar works fine but horizontal one doesnt work 如何为WPF TreeView创建垂直滚动条,而不是水平滚动条? - How to have a vertical scrollbar for a WPF TreeView, but not the horizontal scrollbar? 水平滚动条未显示在我的文本框中 - Horizontal scrollbar not showing on my textbox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM