CSS overflow hides the scrollbar of the textarea text field
The original textarea text input field is preset to, when the text content exceeds the display block, the scrollbar will automatically appear. If you want to hide the scrollbar, you can use the CSS overflow property. The function of this property is to control when the content exceeds the block. The display mode when the situation occurs, and the x-axis or y-axis direction can be set individually, or it can be set at once.
Scrollbar example syntax for hiding textarea text field
Welcome to Wibibi.have a good day.This is scrollbar hidden test.You can see this textarea have no scrollbar both in x direction and y direction.
</textarea>
Example showing resultsFrom the example results, we can see that no scrollbar is displayed on either the x-axis or the y-axis. In the example syntax, we directly use overflow:hidden, so that the horizontal and vertical scrollbar will be hidden at the same time. To set the horizontal or vertical scrollbar to hide, you can use the two writing methods below.
- Set the way to hide the scrollbar in the horizontal direction: overflow-x:hidden;
- Set the way to hide the scrollbar in the vertical direction: overflow-y:hidden;
Post a Comment
0 Comments