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

HTML DOM Style marginBottom প্রোপার্টি


DOM style marginBottom প্রোপার্টি HTML ডকুমেন্টে একটি এলিমেন্টের নিচের মার্জিন রিটার্ন ও পরিবর্তন করে।

সিনট্যাক্স

নিচে সিনট্যাক্স দেওয়া হলো:

  • marginBottom রিটার্ন করা

object.style.marginBottom
  • marginBottom পরিবর্তন করা

object.style.marginBottom = "value"

উদাহরণ

Style marginBottom প্রোপার্টির একটি উদাহরণ দেখি:

<!DOCTYPE html> <html> <head> <style>    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       border: 2px solid #fff;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;       display: block;       color: #fff;       outline: none;       cursor: pointer;    } </style> </head> <body> <h1>DOM Style marginBottom Property Example</h1> <p>    Hi! I'm awesome paragraph with some random text.    Hi! I'm awesome paragraph with some random text.    Hi! I'm awesome paragraph with some random text.    Hi! I'm awesome paragraph with some random text. </p> <button onclick="add()" class="btn">Add margin</button> <script>    function add() {       document.querySelector('p').style.marginBottom = "50px";    } </script> </body> </html>

আউটপুট

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

HTML DOM Style marginBottom প্রোপার্টি

Add margin বাটনে ক্লিক করুন প্যারাগ্রাফ এলিমেন্টে নিচের মার্জিন যোগ করতে।

HTML DOM Style marginBottom প্রোপার্টি


  1. HTML DOM Style transformStyle প্রোপার্টি

  2. HTML DOM Style transformOrigin প্রোপার্টি

  3. HTML DOM Style quotes প্রোপার্টি

  4. HTML DOM Style textTransform প্রোপার্টি