zoukankan      html  css  js  c++  java
  • 拖动滚动条时某一处相对另一处固定不动(position:fixed)

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
    	String path = request.getContextPath();
    	String basePath = request.getScheme() + "://"
    			+ request.getServerName() + ":" + request.getServerPort()
    			+ path + "/";
    %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title></title>
    </head>
    <body>
    	<div style="float:left;height:100px;100%;border:1px solid;text-align:center;">
    		<div style="position:fixed;top:20px;left:20px;100%;border:1px solid; float:left">
    			这个是固定的DIV
    		</div>
    	</div>
    	<div style="float:left;height:300px;2000px;border:1px solid; ">
    		This tall div is absolutely positioned 500 pixels from the top and 60
    		pixels from the left of its containing block.
    	</div>
    </body>
    </html>
    

      

  • 相关阅读:
    View(视图)
    计算器 ——给按钮添加监听器
    Activity(活动)
    UI组件
    计算器界面——GridLayout
    信息界面——GridLayout
    Android计算器界面 TableLayout
    javaji基础x2
    java的开始
    数据类型
  • 原文地址:https://www.cnblogs.com/henuyuxiang/p/6155067.html
Copyright © 2011-2022 走看看