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

CSS :root সিলেক্টরের ভূমিকা


ডকুমেন্টের রুট এলিমেন্ট স্টাইল করতে CSS :root সিলেক্টর ব্যবহার করুন।

উদাহরণ

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

<!DOCTYPE html> <html>   <head>     <style>       :root {         background: blue;         color: white;       }     </style>   </head>   <body>     <h1>Heading</h1>     <p>This is demo text.</p>   </body> </html>

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

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

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

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