tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

line-clamp-021-ref.html (607B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>CSS Reference</title>
      4 <style>
      5 #scrollContainer {
      6  overflow: scroll;
      7  font: 16px / 32px serif;
      8  height: 3lh;
      9  border: 1px solid black;
     10 }
     11 .clamp {
     12  padding: 4px;
     13  background-color: yellow;
     14 }
     15 .pre {
     16  white-space: pre;
     17 }
     18 </style>
     19 
     20 <div id="scrollContainer">
     21 
     22  <div class="clamp">
     23    <div class="pre">Line 1
     24 Line 2
     25 Line 3
     26 Line 4…</div>
     27  </div>
     28 
     29 </div>
     30 
     31 <script>
     32  window.addEventListener("load", () => {
     33    const scrollContainer = document.getElementById("scrollContainer");
     34    scrollContainer.scrollTop = scrollContainer.scrollHeight;
     35  });
     36 </script>