:after Pseudo Element trong CSS



:after Pseudo Element trong CSS

:after Pseudo Element trong CSS để chèn một số nội dung vào sau một phần tử nào đó.

Ví dụ :after Pseudo Element trong CSS

Bạn theo dõi ví dụ sau để thấy cách sử dụng của :after Pseudo Element trong CSS.

<html>
   <head>
      <style type="text/css">
         p:after {
            content: url(/images/bullet.gif)
         }
      </style>
   </head>
   <body>
      <p> Dong text nay se duoc theo sau boi mot Bullet.</p>
      <p> Dong text nay se duoc theo sau boi mot Bullet.</p>
      <p> Dong text nay se duoc theo sau boi mot Bullet.</p>
   </body>
</html> 
Quảng cáo

Kết quả là: