Borders Overlapped in Grid Layout
The borders overlapped when I created a Grid layout with bordered item.
I found a way to resolve this after tried several ways in different blos (none of them works).
Here’s the codes:
Yes, I use the
::after style to make the item border, and change the border color when hovering item.
Notice that the position of
::after element must be
top: -1; and
left: -1;, so that the border between two item will not be overlapped.
z-index style of hovered element is to cover the original border color.