Kizspy | Question: 27
(Choose 1 answer)
Consider the code:
<script>
function myFunction( obj){
obj.style.position="fixed";
obj.style.bottom=0;
obj.style.right=0;
obj.style.width="100px";
obj.style.height="100px";
obj.style.backgroundColor="red";
</script>
<div onclick="myFunction(this)"></div>
And two statements about the code:
1.
The div is positioned relative to the viewport, which means it always stays in the same place even if the
page is scrolled.
2. the fixed div element in the lower-right corner of the page
Choose the right statement.
A. Statement 1 is true and statement 2 is true
B. Statement 1 is false and statement 2 is false
C. Statement 1 is true and statement 2 is false
D. Statement 1 is false and statement 2 is true