簡體   English   中英

我的頁面沒有滾動條

[英]my page doesnt have a scrollbar

我不知道出了什么問題,但是我的頁面沒有滾動條,當頁面超出時,我無法在其下方滾動。 我的代碼似乎有什么問題?

我是ASP.NET的新手,所以,我還不了解。 提前致謝!

這是我完整的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>

<%-當前用戶: -%>

這是我的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>  

在您的CSS中:

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

刪除“ overflow-y:隱藏;”

overflow-y是垂直滾動條,此CSS禁止使用它,有關更多信息,請參見http://www.w3schools.com/cssref/css3_pr_overflow-y.asp

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM