TestFlow_FloatInsideAndOutsideBlock.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  5. <title>Project1</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <style>
  8. div {
  9. padding: 5px;
  10. border: 2px solid blue;
  11. margin: 4px;
  12. }
  13. span {
  14. padding: 5px;
  15. border: 2px solid red;
  16. margin: 4px;
  17. }
  18. </style
  19. </head>
  20. <body>
  21. <script>
  22. function Show(){
  23. var El = document.getElementById('wing');
  24. console.log('Client: l='+El.clientLeft+' t='+El.clientTop+' w='+El.clientWidth+' h='+El.clientHeight+' Scroll: Left='+El.scrollLeft+' Width='+El.scrollWidth+' Top='+El.scrollTop+' Height='+El.scrollHeight);
  25. }
  26. window.addEventListener("load", (event) => {
  27. var El = document.getElementById('feather');
  28. });
  29. </script>
  30. <div style="position: relative;">
  31. <div style="position: absolute;">
  32. <span>Inline1</span><span style="float: right; width: 70px; height: 80px;">FloatR2A FloatR2B</span><br><span>Inline3</span>
  33. <div style="width: 120px;">
  34. <span>Inline4</span><span style="float: right; height: 10px;">FloatR3</span> <span>Inline5</span>
  35. </div>
  36. <span>Inline6</span> <span>Inline7</span> <span>Inline8</span> <span>Inline9</span>
  37. </div>
  38. <span>Inline10</span>
  39. </div>
  40. </div></body>
  41. </html>