例子: //让xxx.jpg图片分别出现在“test”标题两旁 h1:before{ content:url(img/xxx.jpg) }; h1::after{ content:url(img/xxx.jpg) }; <h1>test</h2> 从IE从IE8开始支持这2个伪类