title: What is the main difference between rootMargin & threshold in Intersection Observer API?
body: <p>As I learned that once you have set <strong>rootMargin:&quot;0px&quot;</strong>, it means that the effect will be produced when the element you have selected has been completed visible on screen and have 0px of margin with respect to the viewport or any relative.</p>
  <p>In <strong>threshold property</strong>, it has values from 0% to 100% also denoted as 0 to 1.
  It means that if the value is 1, the callback will run once the element is 100% visible on the viewport.</p>
  <p>Please highlight the differences between them.</p>