CSS的组合导致Chrome中出现奇怪问题,而不是Safari或Firefox。奇怪的Chrome TD背景色问题
我使用max-height
过渡隐藏内容时,输入不集中:
.suggestions {
max-height: 0;
overflow: hidden;
transition: max-height 1s ease-in-out;
}
input:focus ~ .suggestions {
max-height: 300px;
}
我也有CSS设置表格单元格的background-color
时,它有选择的类。
tr:nth-child(odd) {
background-color: light-blue;
}
td.selected {
background-color: dark-blue;
}
在Firefox和Safari浏览器一切正常,但在Chrome当我集中input
,则background-color
丢失。
这是Chrome错误还是我失去了一些东西?
应该怎么看:
它是如何看起来:
您可以在此jsfiddle- https://jsfiddle.net/a7mboskj/看到这个问题。 专注于chrome中的输入,第二个单元不会有绿色背景。在Safari或Firefox中,它具有绿色背景。
请发表您的完成代码或提供演示。 – Alex
添加了示例jsfiddle。谢谢@alirezasafian –
我只是投票重新打开这个问题。 – Alex