1
2
一个简单的解决方案是将peudo元素转换为元素,并使用背景图像作为内联样式,以便可以轻松更改每个元素的图像,并应用与伪元素相同的所有属性:
|
2
2
只需在要从父对象继承的伪对象上设置背景图像,将父对象上的大小设置为0以将其隐藏在那里,最后,设置
已更新
你甚至可以放下里面的
堆栈代码段
|
Nishit Agrawal · Flexbox-将第三项与第二项对齐 2 年前 |
alan · 有没有办法向flexbox图像添加链接? 2 年前 |
n1234 · Flexbox-图像和内容 6 年前 |
Adam Olsson · 在中心CSS中对齐单个列表项 6 年前 |