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

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


required অ্যাট্রিবিউট নেই এমন <input> এলিমেন্ট স্টাইল করতে CSS :optional সিলেক্টর ব্যবহার করুন।

উদাহরণ

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

<!DOCTYPE html> <html>   <head>     <style>       input:optional {         background-color: blue;       }     </style>   </head>   <body>     <form>       Subject: <input type = "text" name = "subject"><br>       Student: <input type = "text" name = "student" required><br>     </form>   </body> </html>

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

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

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

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