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

CSS দিয়ে input type="button" স্টাইল করা

ওয়েব পেজে কোনো বাটন (সাবমিট, রিসেট বা সাধারণ বাটন) কে CSS দিয়ে আকর্ষণীয় করে তুলা যায়। input[type="button"] সিলেক্টর ব্যবহার করে শুধু বাটন টাইপের ইনপুট ফিল্ডগুলো টার্গেট করা যায়।

উদাহরণ

<!DOCTYPE html>
<html>
  <head>
    <style>
      input[type="button"] {
        background-color: orange;
        border: none;
        text-decoration: none;
        color: white;
        padding: 20px 20px;
        margin: 20px 20px;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <p>Fill the below form,</p>
    <form>
      <label for="subject">Subject</label>
      <input type="text" id="subject" name="sub"><br><br>
      <label for="student">Student</label>
      <input type="text" id="student" name="stu"><br>
      <input type="button" value="Button">
    </form>
  </body>
</html>

সুঢ়াব: :hover, :active, :focus পseudo-classes যোগ করে বাটনকে আরও ইন্টারঅ্যাক্টিভ করুন।

  1. CSS দিয়ে ডাউনলোড বাটন স্টাইল করা

  2. CSS দিয়ে সোশ্যাল মিডিয়া বাটন স্টাইল করা

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

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