In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to achieve the floating layer fixed on the right side of the web page in html, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
The code is as follows:
Untitled document body {margin:0px;padding:0px;margin-top:60px;margin-bottom:60px;} # div_nav_zone_right {position:absolute;float:right;z-index:3;width:120px;height:100px;right:0px;top: 332pxtion backgroundCPULING colorizers 999;} # div_nav_zone_right_bottom {position:absolute;float:right;z-index:3;width:120px;height:100px;right:0px;top: 532pxTory backgroundLigure CCC colorscapes } # div_ul {position:fixed;height:50px;} ul,li {margin:0px;} li {list-style:none;} $(function () {moveDiv (); / / Page initialization execution $(window) .initiate (function () {moveDiv (); moveRightBottomDiv ();});}); / / right centered function moveDiv () {var scrollTop = $(document) .scrollTop (); / / height hidden at the top of the scroll bar var clientHeight = $(window). Height () / / the height of the content area of the web page / / sets the location to var hei = $("# div_nav_zone_right"). Css ("height"); hei = hei.replace ("px", ""); var newPosY = scrollTop + (clientHeight-hei) / 2 div_nav_zone_right $("# div_nav_zone_right"). Css ("top", newPosY+ "px");} / / 100 pixels function moveRightBottomDiv () {var scrollTop = $(document). ScrollTop () / / the height hidden at the top of the scroll bar var clientHeight = $(window). Height (); / / the height of the web content area / / sets the location to var hei = $("# div_nav_zone_right_bottom"). Css ("height"); hei = hei.replace ("px", ""); var newPosY = clientHeight + scrollTop-hei-100 position $("# div_nav_zone_right_bottom"). Css ("top", newPosY+ "px");} 1 2 3 4 5 6 7 8 9 10
Sd
F
Ads
F
Ads
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.