css3 “::after” pseudo-element not working

淺唱寂寞╮ 提交于 2019-12-02 01:32:06

In order for the pseudo element to be generated, you need to specify a content value. The value is otherwise assumed to be the default, none - which is likely why it isn't working in your case. (example)

.header-wrapper .part1::after {
    content: '';
    width: 0;
    height: 0;
    border-left: solid 48.35px #f21e1e;
    border-bottom: solid 48.35px transparent;
    border-top: solid 48.35px transparent;
}

Based on the CSS you posted, you should also remove the space between .part1 ::after.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!