In this article, we delve into the question of how to determine vertical text overflow within a DIV element. CSS and HTML Setup
div.rounded {
background-color: #FFF;
height: 123px;
width: 200px;
font-size: 11px;
overflow: hidden;
}
Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Phasellus vel quam vestibulum orci blandit laoreet.
function GetContainerSize() {
var container = document.getElementById("tempDiv");
var message =
"The width of the contents with padding: "
container.scrollWidth
"px.\n";
message =
"The height of the contents with padding: "
container.scrollHeight
"px.\n";
alert(message);
}
For more information on this topic, please refer to the following script following:
[Overflow Documentation](http://help.dottoro.com/ljbixkkn.php)Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3