Table TR with background-size bug Safari

折月煮酒 提交于 2019-12-07 00:52:27

You seem to be correct that it is a bug. It isn't just the element <tr> itself but any element displayed as a table-row in a table displayed element. I've replicated the issue in the snippet below using non-table elements by changing the display property of each. (will only show incorrectly in Safari).

If you are able to change the display property of tr { } without it affecting your layout/design it will fix it. Try a few of the other display properties to see if any work.

.tbody {
  background-color:red;
  display: table;
}
.tr {
  background-image:linear-gradient(to right, black, black);
  background-size: 50% 100%;
  background-repeat:no-repeat;
  color:white;
  display: table-row;
}
span {
  display: table-cell;
}
<div class="tbody">
  <div class="tr">
    <span>aaaaaaaaaaaa</span>
    <span>bbbbbbbbbbbb</span>
    <span>cccccccccccc</span>
  </div>
</div>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!