误区 伪元素 ::after和::before必须 在里面加 content=’ ’ 才能生效. content中文字样式默认为白色 ,使用:hover可以使content中的内容改变颜色. 但是如果在 ::after 中设置了颜色color 就会使content中文字默认颜色改变 , 这时候在使用 :hover 无法使content中的内容改变颜色.