我一直试图让移动上的列宽变为50%,但是我尝试过的所有内容都没有奏效。这是CSS。调整表格中的列宽(CSS/HTML)
@media (max-width: 768px) {
#customTable tbody { float: left; }
#customTable thead { float: left; }
#customTable thead { min-width: 120px }
#customTable td { display: block }
#customTable th { display: block }
#customTable {table-layout: fixed;}
#customTable td {width: 50%;}
#customTable td {height: 20px; overflow: hidden;}
#customTable div {height: 20px;overflow: hidden;}
}
下面是HTML
Test 1Test 2Test 3Test 4
TestTestTestTest
+0
您如何期望4列各占50%?这不是200%? –