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

CSS-এ ডিফল্ট Display মান পরিবর্তন করুন


CSS-এ প্রতিটি এলিমেন্টের একটি ডিফল্ট display মান থাকে যা সহজে পরিবর্তন করা যায়। এটি display প্রপার্টির মান স্পষ্টভাবে সেট করে করা যায়। নিচে inline display মান ব্যবহার করে হরিজন্টাল মেনু बनाने উদাহরণ দেওয়া হলো:

উদাহরণ

<!DOCTYPE html>
<html>
<head>
<style>
p { background-color: orange; color: white; }
li { display: inline; }
</style>
</head>
<body>
<h2>Tutorials List</h2>
<p>Following are the list of resources:</p>
<ul>
  <li><a href="https://www.tutorialspoint.com/machine_learning/index.htm" target="_blank">Machine Learning</a></li>
  <li><a href="https://www.tutorialspoint.com/python_data_science/index.htm" target="_blank">Python Data Science</a></li>
  <li><a href="https://www.tutorialspoint.com/python/index.htm" target="_blank">Python</a></li>
  <li><a href="https://www.tutorialspoint.com/csharp/index.htm">C#</a></li>
  <li><a href="https://www.tutorialspoint.com/artificial_intelligence/index.htm" target="_blank">Artificial Intelligence</a></li>
</ul>
</body>
</html>

আউটপুট

CSS-এ ডিফল্ট Display মান পরিবর্তন করুন


  1. CSS দিয়ে লিংকের রঙ সেট করা

  2. CSS দিয়ে লিংক থেকে ডিফল্ট আন্ডারলাইন সরানো

  3. CSS color প্রপার্টি দিয়ে এলিমেন্টের টেক্সট রঙ পরিবর্তন

  4. CSS ইমেজ স্প্রাইট থেকে আইকন প্রদর্শন করা