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

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


চাইল্ড নেই এমন <p> এলিমেন্ট স্টাইল করতে CSS :empty সিলেক্টর ব্যবহার করুন। নিচের কোড রান করে :empty সিলেক্টর ইমপ্লিমেন্ট করুন।

উদাহরণ

<!DOCTYPE html> <html>   <head>     <style>       p.demo {         width: 300px;         height: 20px;         background: gray;       }       p:empty {         width: 150px;         height: 20px;         background: orange;       }     </style>   </head>   <body>     <p class = "demo">This is demo text. Below is empty text.</p>     <p></p>   </body> </html>

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

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

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

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