কম্পিউটার

জাভাস্ক্রিপ্ট দিয়ে কলামের প্রস্থ এবং কলাম গণনা কিভাবে সেট করবেন?


একক ঘোষণায় কলামের প্রস্থ এবং কলামের সংখ্যা সেট করতে, JavaScript কলাম ব্যবহার করুন সম্পত্তি।

উদাহরণ

আপনি জাভাস্ক্রিপ্টের সাথে কলামের প্রস্থ এবং কলামের সংখ্যা সেট করতে নিম্নলিখিত কোড চালানোর চেষ্টা করতে পারেন -

<!DOCTYPE html>
<html>
   <head>
      <style>
         #myID {
            column-count: 4;
            column-rule: 4px solid yellow;
         }
      </style>
   </head>
   <body>
      <p>Click below to change the column count to 2 and minimum size</p>
      <button onclick="display()">Change Column count and set size</button>
      <div id="myID">
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
      </div>
      <script>
         function display() {
            document.getElementById("myID").style.columns = "70px 2";
         }
      </script>
   </body>
</html>

  1. কিভাবে জাভাস্ক্রিপ্ট দিয়ে কলামের প্রস্থ ফেরত বা সেট করবেন?

  2. জাভাস্ক্রিপ্ট দিয়ে পাঠ্যের দিকনির্দেশ কিভাবে সেট করবেন?

  3. জাভাস্ক্রিপ্ট দিয়ে লেখার ফন্ট সাইজ কিভাবে সেট করবেন?

  4. জাভাস্ক্রিপ্টের সাথে একটি উপাদানের অনুভূমিক প্রান্তিককরণ কিভাবে সেট করবেন?