কম্পিউটার টিউটোরিয়াল

CSS :last-of-type সিলেক্টরের ভূমিকা


প্যারেন্টের শেষ চাইল্ড হয়ে <p> এলিমেন্ট স্টাইল করতে CSS :last-child সিলেক্টর ব্যবহার করুন।

উদাহরণ

নিচের কোড রান করে :last-child সিলেক্টর ইমপ্লিমেন্ট করুন।

<!DOCTYPE html> <html>   <head>     <style>       p:last-of-type {         background: orange;       }     </style>   </head>   <body>     <h2>Heading</h2>     <p>This is demo text1.</p>     <p>This is demo text2.</p>     <p>This is demo text3.</p>   </body> </html>

  1. CSS :hover সিলেক্টরের ভূমিকা

  2. CSS :focus সিলেক্টরের ভূমিকা

  3. CSS :nth-last-of-type(n) সিলেক্টরের ভূমিকা

  4. CSS :nth-last-child(n) সিলেক্টরের ভূমিকা