要搭配::after和::before
#id1::before{
content:"haha";//文本
content:url('https://www.baidu.com.hah.png');//图片
content:attr(color)://元素属性
}
参考:https://segmentfault.com/a/1190000018143558
要搭配::after和::before
#id1::before{
content:"haha";//文本
content:url('https://www.baidu.com.hah.png');//图片
content:attr(color)://元素属性
}
参考:https://segmentfault.com/a/1190000018143558