Using jQuery to implement. Pictures used:
1. Try scrolling this page to the bottom and the go2top button will appear.
2. go2top-inner is not used yet.
HTML&JS definition:
CSS Definition
.go2top {
background: url("
http://images.cnitblog.com/blog/84698/201303/28125209-67653841b1114531a2a1e6db63315d63.png") no-repeat scroll left top transparent;
Bottom: 65px;
Color: #444444;
Display: none;
Height: 50px;
Margin-left: 510px;
position: fixed;
Right: 160px;
Text-align: center;
Width: 50px;
}
.go2top:hover {
Background-position: -50px top;
}
Try it and see if you can return to the top. It is a very convenient and practical function. I hope you will like it.