Html 当窗口大小减小时,窗口页面中的表不应具有水平滚动条
我试过了Html 当窗口大小减小时,窗口页面中的表不应具有水平滚动条,html,css,Html,Css,我试过了 <table border="0" cellspacing="0" cellpadding="0" height="25" width="100%" style='table-layout:fixed' > 及 您需要指定两个属性,表布局:固定在表上,空白:nowrap;在牢房里。您还需要移动溢出:隐藏;也去牢房 table {width:100%; table-layout:fixed;} td {overflow:hidden; white-space:now
<table border="0" cellspacing="0"
cellpadding="0" height="25" width="100%" style='table-layout:fixed' >
及
您需要指定两个属性,表布局:固定在表上,空白:nowrap;在牢房里。您还需要移动溢出:隐藏;也去牢房
table {width:100%; table-layout:fixed;}
td {overflow:hidden; white-space:nowrap;}
您可以使用
overflow-x:hidden
仅在文本溢出时水平隐藏文本。类似地overflow-y:hidden
隐藏垂直滚动条。请记住,还要将表格布局设置为固定,将空白设置为不换行我的代码是一个JSP页面,当我尝试“表格布局”和“溢出-x”时,它会显示未定义的属性名称。你能发布完整的相关代码吗?可能是其他地方的问题。
table {width:100%; table-layout:fixed;}
td {overflow:hidden; white-space:nowrap;}