I did it again according to the method described at the first level, but it didn't have any effect. Is it my template? Think twice about it. However, the method is good and the effect is remarkable. Let's analyze it here. One thing to note: This JS special effect is not original. It was actually seen during a visit to Lu songsong's blog yesterday. It feels pretty good. Use SyntaxHighlighter. all ();
I did it again according to the method described at the first level, but it didn't have any effect. Is it my template? Think twice about it. However, the method is good and the effect is remarkable. Let's analyze it here.
One thing to note: This JS special effect is not original. It was actually seen during a visit to Lu songsong's blog yesterday. It feels good. It will be helpful to increase the interaction heat of blogs in the future, so we transplanted it. The color of the image has been adjusted, and the positioning parameters in the JS file have also been re-tuned. It looks good and suits my topic. Let's share it today. If you use this green topic, you can add it directly in the following tutorial.
Step 1: Save the following code as a JS file and name it yourself, for example, "fudong. js"
JavaScript code
LastScrollY = 0;
Function heartBeat (){
Var diffY;
If (document.doc umentElement & document.doc umentElement. scrollTop)
DiffY = document.doc umentElement. scrollTop;
Else if (document. body)
DiffY = document. body. scrollTop
Else
{/* Netscape stuff */}
Percent =. 1 * (diffY-lastScrollY );
If (percent> 0) percent = Math. ceil (percent );
Else percent = Math. floor (percent );
Document. getElementById ("full"). style. top = parseInt (document. getElementById ("full"). style. top) + percent + "px ";
LastScrollY = lastScrollY + percent;
/* If (diffY = 0) {document. getElementById ("full"). style. display = "none "}
Else {document. getElementById ("full"). style. display = "block "}
}*/
If (diffY> 450) {document. getElementById ("full"). style. display = "block "}
Else {
Document. getElementById ("full"). style. display = "none "}
}
Suspendcode ="
"
Document. write (suspendcode );
Window. setInterval ("heartBeat ()", 1 );
Since the above special effect belongs to three connections, you can change the code if you want to remove the "Homepage" from the top, homepage, and bottom pages:
JavaScript code
Align: center;>
Src = ../THEMES/loker_cms/style/images/btn_top.gif border = 0/>
Step 2: Upload the JS file to the SCRIPT directory under the topic package;
Step 3: Upload the two required images btn_top.gif?btn_comment.gif to the/style/images/directory under the topic package;
Step 4: Go to the background and edit and modify the "./THEMES/topic package ID/TEMPLATE/single.html" file under the topic package."Area, insert JS call code
JavaScript code