Home > Backend Development > PHP Tutorial > discuz forum adds and replaces return to top icon

discuz forum adds and replaces return to top icon

WBOY
Release: 2016-07-25 09:13:43
Original
1417 people have browsed it
If the forum does not have the function of returning to the top, add the code in your footer.htm (/template/default/common/)
  1. {lang scrolltop}
Copy code
1. Get your favorite "return to top" icon and upload it to cover the original Discuz icon
① Get your favorite icons and search a lot of them online. Keywords: Return to the top icon material
②The directory path where the "Return to Top" icon is located: /static/image/common/scrolltop.png Then upload your own icon to overwrite it, and proceed to the next step after completion.

2. Modify the relevant css parameters and modify the size of the return to top icon

Since your icon may not be the same size as the original icon, it will not be fully displayed after overwriting. Therefore, you need to modify the relevant css parameters and modify the size of the icon returned to the top.
Return to the top icon css file directory path: /template/default/common/common.css
Open the editor and find the code
  1. : #scrolltop { visibility: hidden; position: fixed; bottom: 100px; display: block; margin: -30px 0 0; width< ;/font>: 20px; height: 50px; background: url({IMGDIR}/scrolltop.png ) no-repeat 50% 0; line-height: 999px; overflow: hidden; cursor: pointer; }
Copy code
(Open the css file and search scrolltop directly to find this code quickly)
Among them, width and height correspond to the width and height of the icon respectively. For example: if the icon size is 20X50, then the width and height in the code are modified to: width: 20px; height: 50px;
After the modification is completed, upload the overlay and modify the return to top icon successfully! Don’t forget to update the cache!
discuz


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template