CSS :after 伪元素

cssweb developmentfront end technology更新于 2025/3/17 3:56:17

使用此元素在元素后插入一些内容。以下示例演示了如何使用  :after 元素在元素后添加一些内容。

示例

<html>
   <head>
      <style>
         p:after
         {
            content: url(/images/bullet.gif)
         }
      </style>
   </head>
   <body>
      <p> This line will be succeeded by a bullet.</p>
      <p> This line will be succeeded by a bullet.</p>
      <p> This line will be succeeded by a bullet.</p>
   </body>
</html>

相关文章


有用资源