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

CSS দিয়ে এলার্ট বাটন স্টাইল করা


উদাহরণ

নিচের কোডটি CSS ব্যবহার করে এলার্ট বাটন স্টাইল করার উদাহরণ:

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> button { border: none; color: white; font-weight: bolder; padding: 20px; font-size: 18px; cursor: pointer; border-radius: 6px; } .Success { background-color: #4caf50; } .Success:hover { background-color: #46a049; } .Info { background-color: #2196f3; } .Info:hover { background: #0b7dda; } .Warning { background-color: #ff9800; } .Warning:hover { background: #e68a00; } .Danger { background-color: #f44336; } .Danger:hover { background: #da190b; } .Default { background-color: #e7e7e7; color: black; } .Default:hover { background: #ddd; } </style> </head> <body> <h1>Alert Buttons Example</h1> <button class="Success">Success</button> <button class="Info">Info</button> <button class="Warning">Warning</button> <button class="Danger">Danger</button> <button class="Default">Default</button> </body> </html>

আউটপুট

উপরের কোডটি নিচের আউটপুটটি তৈরি করবে:

CSS দিয়ে এলার্ট বাটন স্টাইল করা

  1. CSS দিয়ে HR এলিমেন্ট স্টাইল করার পদ্ধতি

  2. CSS দিয়ে লেবেল স্টাইল করার পদ্ধতি

  3. CSS দিয়ে স্ক্রোলবার লুকানো

  4. CSS দিয়ে হেডার (Header) স্টাইল করা