html – overflow:scroll;在

为什么CSS属性溢出:scroll;不在< td>中工作,而overflow:hidden;效果很好?
<table border="1" style="table-layout:fixed; width:100px">
  <tr>
    <td style="overflow:scroll; width:50px;">10000000000000000000000000000000000</td>
    <td>200</td>
    <td>300</td>
  </tr>
</table>

从CSS规范1,2,我看不出为什么.

解决方法

我有东西 from here

Andrew FedonIoUk wrote:

This is actually my question:
“One technical reason is that the overflow property does not apply to
tables.” – why? What is this reason?


我不是专家,但我相信这是
只是为了向后兼容
遗留表行为.你可以检查
自动”表布局
规格中的算法我很漂亮
肯定这个布局算法是
与溢出不兼容
财产(或更准确地说,
布局算法永远不会导致
需要任何溢出值
除了’可见’).

Yep,this is why I am asking. Seems like there are no formal reasons
why or should not be scrollable but seems like
UA vendors reached some silent agreement in this area. So is the
question.


规格同意您的尊重
到元素表格是
应该尊重溢出,虽然
至少,Mozilla似乎不行
所以.我不能回答你的问题
这个例子,虽然我还是会的
猜测答案还是有关系的
传统渲染.

main thread is here.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些