我的網站上有一張桌子。當我添加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 回答
- 0 關注
- 153 瀏覽
添加回答
舉報
0/150
提交
取消