How does bootstrap set the page to hover back to the top?
This article will explain in detail how to set up the page to hover at the top of the bootstrap. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The bootstrap settings page returns to the top hover prompt as follows:
1. First add the "back to the top" button in body
2. The definition of css
Div. Go-top {display: none;opacity: 0.6 positon position: fixed;bottom: 113pxleft: 90% exodus left: 40pxleft: 1px solid # a38a54mittwidth: 38pxmith height: 38pxscape backgroundcolor: # eddec2;border-radius: 3pxShicursor: pointer;} div. Go-top:hover {opacity: 1x filter: alpha (opacity=100);} div. Go-top div .arrow {position: absolute;left: 10pxscape top:-1pxscape width: 0height: 0candidate border: 9px solid transparent Border-bottom-color: # cc3333;} div. Go-top div. Stick {position: absolute;left: 15pxscape top: 15pxscape width: 8pxash height: 14pxscape display: block;background-color: # cc3333;-webkit-border-radius: 1pxleman Muzlyborderradius: 1pxborderwayradius: 1pxborderwayradius: 1px;}
Use fixed positioning so that the button always appears in the lower right corner. By setting left:90%, you can make the button appear on the right side, but not too close to the scroll bar.
3. The button is not visible by default. When the page is scrolled to a certain height, it appears.
Function () {if ($(window). ScrollTop () > 1000) $('div.go-top'). Show (); else$ (' div.go-top'). Hide ();}); $('div.go-top') .click (function () {$(' html, body'). Animate ({scrollTop: 0}, 1000);});}) This is the end of the article on "how to set the page to hover at the top of the bootstrap". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.