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

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


প্যারেন্টের শেষ চাইল্ড থেকে গণনা করে দ্বিতীয় <p> এলিমেন্ট সিলেক্ট করতে CSS :nth-last-of-type(n) সিলেক্টর ব্যবহার করুন।

উদাহরণ

নিচের কোড রান করে :nth-last-of-type(n) সিলেক্টর ইমপ্লিমেন্ট করুন:

<!DOCTYPE html> <html>   <head>     <style>       p:nth-last-of-type(2) {         background: blue;         color: white;       }     </style>   </head>   <body>     <p>This is demo text 1.</p>     <p>This is demo text 2.</p>     <p>This is demo text 3.</p>     <p>This is demo text 4.</p>     <p>This is demo text 5.</p>   </body> </html>

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

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

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

  4. CSS :required সিলেক্টরের ভূমিকা