Skip to content

Commit

Permalink
added tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Supraboy981322 authored Nov 10, 2023
1 parent 1767d52 commit d7c4a31
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions proto-and-wip/text-break.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,25 @@
word-wrap: break-word;
z-index: 1;
}

.watermark {
float: right;
padding-right: 5px;
color: blue;
z-index: 1;
}

#tooltip {
z-index: 50;
float: left;
position: absolute;
top: 8vh;
top: 7vh;
border: 5px solid blue;
padding: 5px;
left: 37.5vw;
width: 21vw;
font-size: 3vw;
border-radius: 25px;
}
</style>

Expand All @@ -64,21 +70,20 @@
<div id="output" class="output"></div>
</div>
<div class="watermark">Lunch Break Software</div>
<div id="tooltip"><span>test<span></div>
<div id="tooltip"><span>&#11014 Text Input &#11014<span></div>
</body>
<script>
<script>

function loadText() {
let tooltip = document.getElementById("tooltip");

output.innerHTML = "Lorem Ipsum";
output.style.fontSize = '100px'; // Default font size
resize_to_fit();

tooltip.setAttribute("style", "display:block");
}
addEventListener(window.onload, loadText());
</script>
<script>
addEventListener(window.onload, loadText());
</script>
<script>
const input = document.querySelector('input');
const output = document.querySelector('.output');
const outputContainer = document.querySelector('.container');
Expand All @@ -95,6 +100,7 @@
output.innerHTML = this.value;
output.style.fontSize = '100px'; // Default font size
resize_to_fit();
document.getElementById("tooltip").setAttribute("style", "display:none;");
}
input.addEventListener('input', processInput);
</script>
Expand Down

0 comments on commit d7c4a31

Please sign in to comment.