Edit in JSFiddle
JavaScript
HTML
CSS
Result
<h1>这是h1</h1> <h2>这是h2</h2>
h1::after{ content:"h1后插入内容" } h2::after{ content:none }