简体   繁体   English

Html 背景颜色在边框半径后面

[英]Html background colour behind border-radius

I have an html table with the thead set as position:sticky , which works fine.我有一个 html 表,其标题设置为thead position:sticky ,效果很好。 The row has background-color and border-radius set as you ca see here:如您在此处看到的那样,该行设置了background-colorborder-radius

标题

The problem is that when the rows scroll up 'behind' the header you can see them in the cut off corner.问题是当行在 header 的“后面”向上滚动时,您可以在切掉的角落看到它们。

在此处输入图像描述

So, how do I set the background colour that appears behind an element with a background colour and border radius?那么,如何设置出现在具有背景颜色和边框半径的元素后面的背景颜色呢? Or is there some other way to stop this happening?还是有其他方法可以阻止这种情况发生?

在此处输入图像描述

The background must be on the element behind your thead .背景必须在你的头后面的thead上。

Once you find which element has that color, put overflow: hidden;一旦你找到哪个元素有那个颜色,就把overflow: hidden; on that (parent) element.在那个(父)元素上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM