CSS adds scrolling to div and hides the scroll bar. The specific code is as follows: In html <div class="box"> <div>The following content will scroll separately</div> <div class="scroll"> <div class="content"> <p>1111111111111111</p> <p>22222222222222</p> <p>333333333333333</p> <p>444444444444444</p> <p>1111111111111111</p> <p>22222222222222</p> <p>333333333333333</p> <p>444444444444444</p> </div> </div> </div> CSS part <style> div{ font-size: 15px; margin-bottom: 20px; } .content{ height: 300px;v // The height of the scrolling part must be set background-color: cadetblue; color: antiquewhite; overflow-x: hidden; /*x-axis scrolling is prohibited*/ overflow-y: scroll;/*y-axis scroll*/ } .content::-webkit-scrollbar { display: none;/*Hide scroll bar*/ } p{ margin-bottom: 30px; font-size: 17px; color: #333; } </style> Summarize The above is the CSS that I introduced to you to add scrolling to div and hide the scroll bar. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! |
>>: Common functions of MySQL basics
Table of contents 1. Introduction 2. What is func...
MySQL 5.7 and above versions provide direct query...
Step 1: Download the mysql driver cmd enters the ...
Table of contents About G2 Chart use Complete cod...
A web designer's head must be filled with a lo...
Preface The writing of front-end code can never e...
one. Remote deployment using tomcat 1.1 Problems ...
Abstract: Whether at work or in an interview, opt...
Install ZLMediaKit on centos6 The author of ZLMed...
Overview It is usually not what we want to presen...
Table of contents First, let's briefly introd...
Absolute length px px is the pixel value, which i...
Table of contents 1. Implementation 2. Problems 3...
radio-and-checkbox Pure CSS to achieve radio and ...
mysqlslap Common parameter description –auto-gene...