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

HTML DOM Style backgroundRepeat প্রপার্টি


style backgroundRepeat প্রপার্টি ব্যবহার করে ব্যাকগ্রাউন্ড ইমেজ কীভাবে রিপিট হবে তা সেট বা গেট করা হয়।

সিনট্যাক্স

backgroundRepeat প্রপার্টি সেট করার সিনট্যাক্স:

object.style.backgroundRepeat = "repeat|repeat-x|repeat-y|no-repeat|initial|inherit"

মানসমূহ

ক্রমমান ও বিবরণ
১repeat
ডিফল্ট মান। ব্যাকগ্রাউন্ড ইমেজ লম্ব এবং আড়াঢালে উভয় দিকেই রিপিট হয়।
২repeat-x
ব্যাকগ্রাউন্ড ইমেজ শুধু আড়াঢালে (horizontally) রিপিট হয়।
৩repeat-y
ব্যাকগ্রাউন্ড ইমেজ শুধু লম্বে (vertically) রিপিট হয়।
৪no-repeat
ব্যাকগ্রাউন্ড ইমেজ রিপিট হয় না।

উদাহরণ

backgroundRepeat প্রপার্টির উদাহরণ:

<!DOCTYPE html> <html> <head> <style> 
  body { 
    background-image: url("https://www.tutorialspoint.com/power_bi/images/power-bi-minilogo.jpg"); 
    background-repeat: repeat-x; 
    color:black; 
    font-size:20px; 
  } 
</style> 
<script> 
  function changeBackRepeat(){ 
    document.body.style.backgroundRepeat="repeat-y"; 
    document.getElementById("Sample").innerHTML="The background image is now repeated vertically"; 
  } 
</script> 
</head> 
<body> 
<h2>Demo Heading</h2> 
<p>This is demo text.</p> 
<p>This is demo text.</p> 
<p>This is demo text.</p> 
<p>This is demo text.</p> 
<p>Change the body background image repeat value by clicking the below button</p> 
<button onclick="changeBackRepeat()">CHANGE REPEAT</button> 
<p id="Sample"></p> 
</body> </html>

আউটপুট

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

HTML DOM Style backgroundRepeat প্রপার্টি

CHANGE REPEAT বাটনে ক্লিক করলে:

HTML DOM Style backgroundRepeat প্রপার্টি

  1. HTML DOM Style borderImageSource প্রপার্টি

  2. HTML DOM Style borderImageSlice প্রপার্টি

  3. HTML DOM Style filter প্রপার্টি

  4. HTML DOM Style listStyleImage প্রপার্টি