在一个菜单面板的时候,把间隔线设置成了 1 绝对像素,生成的效果是下面这样的,在一个线跟其它的不同。但在 Chrome 上就不会出现这问题。css
width: 100%; bottom: 0; left: 0; content: ''; display: block; border-bottom: 1px solid #8E8E93; position: absolute; transform-origin: 0 100%; transform: scaleY(0.5);
细找问题,找出来了,我在 ::after
内写的是 border-bottom
,也就是说,在纵向压缩的时候,压缩的是 border
。
换成用 background-color
,也就是用 after 的主体。spa
width: 100%; bottom: 0; left: 0; content: ''; display: block; background-color: #8E8E93; height: 1px; position: absolute; transform-origin: 0 100%; transform: scaleY(0.5);
完成code
前orm
后ip