标签:tom code otto Fix class gray content add pos
<!DOCTYPE html> <html> <head> <style> * { margin: 0; padding: 0; } .content { width: 100%; height: 2000px; background-color: gray; } .dw { position: fixed; width: 100px; height: 100px; color: #fff; right: 50px; bottom: 100px; background-color: blueviolet; line-height: 100px; text-align: center; } </style> </head> <body> <div class="content" id="top"> 顶部 <a href="#top"> <div class="dw">回到顶部</div> </a> </div> </body> </html>
标签:tom code otto Fix class gray content add pos
原文地址:https://www.cnblogs.com/meiqiyuanzi/p/12286376.html