亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

位置:固定使表格單元格延伸到整個屏幕

位置:固定使表格單元格延伸到整個屏幕

慕標琳琳 2023-12-25 16:10:51
我的網站上有一張桌子。當我添加position:fixed到表格時,表格的單元格突然延伸到頁面的整個高度,即使它們具有設定的高度。正如您在下面的代碼中看到的,每個 tr 都有一個設置的高度值,但是當我添加position:fixed到表格時它被忽略,而是單元格獲取整個頁面的高度,并阻止我訪問網站。任何有關如何解決此問題的幫助,同時仍保留該position:fixed屬性,將不勝感激。.center {            margin:0 auto;        }        a{            text-decoration:none;            color:red;        }        table{            text-align:center;            width:30%;            left:25%;                        /*font-size:larger;*/        }                body{            background-color:midnightblue;            color:snow;            white-space:nowrap;        }        .Error{            color:red;        }        .divSargel{            width:initial;            background-color:snow;            border: solid;    border-color: #000080;    float: left;    margin-left: 0.3%;    color: red;    font-size:x-large;    font-family:monospace;    border-radius: 20px;    text-align: center;    width:100%;        }        .divSargel:hover {        background-color: blue;        transition: linear 0.5s;            }
查看完整描述

1 回答

?
胡子哥哥

TA貢獻1825條經驗 獲得超6個贊

嘗試height根據需要設置表格并將其標記為重要,例如

table{
 height : 150px !important;
}



查看完整回答
反對 回復 2023-12-25
  • 1 回答
  • 0 關注
  • 153 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號