Vikhyath_11

w7

Jul 29th, 2024 (edited)
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Program7</title>
  7. <style>
  8. #stack1,#stack2,#stack3{
  9. position: absolute;
  10. padding: 10%;
  11. border: solid;
  12. width:150px;
  13. height: 50px;
  14. text-align: center;
  15. }
  16. #stack1{
  17. top:30%;
  18. left:30%;
  19. background-color: aqua;
  20. }
  21. #stack2{
  22. top:35%;
  23. left:35%;
  24. background-color: aquamarine;
  25. }
  26. #stack3{
  27. top:40%;
  28. left:40%;
  29. background-color: lightpink;
  30. }
  31.  
  32. </style>
  33. <script>
  34. function totop(curelem){
  35. document.getElementById(curelem).style.zIndex="1";
  36. }
  37. function original(){
  38. document.getElementById('stack1').style.zIndex="0";
  39. document.getElementById('stack2').style.zIndex="0";
  40. document.getElementById('stack3').style.zIndex="0";
  41.  
  42. }
  43. </script>
  44. </head>
  45. <body>
  46. <p id="stack1" onmouseover="totop('stack1')" onmouseout="original()">Hello! Good Morning</p>
  47. <p id="stack2" onmouseover="totop('stack2')" onmouseout="original()">Welcome to DSCE</p>
  48. <p id="stack3" onmouseover="totop('stack3')" onmouseout="original()">Thank You</p>
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment