技术标签: ViewUI CSS jQuery JavaScript XHTML HTML 工作
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS样式定位</title>
<meta http-equiv="content-type" content="text/html; charset=gbk">
</head>
<body>
<img src="my.png" style="position:absolute;left:20px;top:expression(parseInt(document.body.scrollTop)+20);" />
<div style="height:2000px;"></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS样式定位</title>
<meta http-equiv="content-type" content="text/html; charset=gbk">
</head>
<body>
<script type="text/javascript">
//兼容xhtml1.0和html4 / 用hack兼容ie6 ie7 ff
var imgHtml = '';
var isIE7 = /MSIE 7/.test(navigator.appVersion);
if(document.compatMode && document.compatMode != 'BackCompat'){
imgHtml = '<img src="my.png" style="right:10px; bottom:10px;POSITION:fixed;'+(isIE7?'':'_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop);')+'" />';
}else {
imgHtml = '<img src="my.png" style="right:10px; bottom:10px;display:none;POSITION:fixed;*position:absolute; *top:expression(eval(document.body.scrollTop)+eval(document.body.clientHeight)-this.style.pixelHeight);" />';
}
document.write(imgHtml);
</script>
<div style="height:2000px;"></div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS样式定位</title>
<meta http-equiv="content-type" content="text/html; charset=gbk">
</head>
<body>
<div id="myDiv" style="position:absolute;left:20px;background:#555;width:100px;height:100px;" />
<div style="height:2000px;"></div>
<script type="text/javascript">
var myDivEl = document.getElementById('myDiv');
var fixpos = myDivEl.style.posTop;
document.body.onscroll=function(){
myDivEl.style.posTop = document.body.scrollTop + fixpos;
}
</script>
</body>
</html>
var myDivEl = document.getElementById('myDiv');
var init_pos = myDivEl.style.posTop;
document.body.onscroll=function(){
myDivEl.style.posTop=document.body.scrollTop+fixpos
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS样式定位</title>
<meta http-equiv="content-type" content="text/html; charset=gbk">
</head>
<body>
<div id="myDiv" style="position:absolute;left:20px;background:#555;width:100px;height:100px;" />
<div style="height:2000px;"></div>
<script type="text/javascript">
var myDivEl = document.getElementById('myDiv');
//初始化变量fixpos为层myDiv的Y坐标值
var fixpos = myDivEl.style.posTop
//文档区域滚动时执行scrollit()函数
document.body.onscroll=function scrollit(){
//层要移动到的目标坐标
var target_pos=document.body.scrollTop+fixpos;
var step=5; //变量step为步长,层每次移动的距离量
//如果是往上拉滚动条,步长应为负值
if(myDivEl.style.posTop>target_pos)
step*=-1
myDivEl.style.posTop+=step //层的Y坐标值增加
//判断层的当前Y坐标值跟目标距离间的值是否大于一个定值,是的话在50毫秒后继//续执行一次scrollit()函数,否则层停止在当前位置
if(Math.abs(myDivEl.style.posTop-target_pos)>Math.abs(step)) setTimeout("scrollit()",50)
}
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS样式定位</title>
<meta http-equiv="content-type" content="text/html; charset=gbk">
</head>
<body>
<div id="myDiv" style="position:absolute;left:20px;background:#555;width:100px;height:100px;" />
<div style="height:2000px;"></div>
<script type="text/javascript">
var myDivEl = document.getElementById('myDiv');
//变量fixpos为层的最初Y坐标值,last_pos为层最后一层移动后的Y坐标值,在下面的函数执行之前它们是相等的
var fixpos=last_pos=myDivEl.style.posTop;
/*setInterval(表达式或函数,时间)的作用是每隔一段时间(单位:毫秒)之后执行一次表达式或函数,这里是每1毫秒(千分一秒)执行一次函数*/
setInterval(function(){
//目标坐标,上两段代码里解释过具体意思了
var target_pos=document.body.scrollTop+fixpos;
/*步长,目标位置减上一次移动后的位置的十分一(10是经验数字,换成其它值的话效果会产很远),因为last_pos是不断接近target_pos的,所以step的绝对值也越来越小,这就是产生弹性移动的原因。最后"|0"的意思是把前面的计算结果跟0进行二进制的按位“或”运算,作用等同于Math.floor(),只是效率更高*/
var step=(target_pos-last_pos)/10|0;
//以step为步长移动层
myDivEl.style.posTop+=step;
//更新变量last_pos的值,没有这步也不可能产生弹性移动效果
last_pos+=step;
//这里的1是1毫秒
},1);
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JQUERY-JS定位</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<script src="jquery.js" type="text/javascript"></script>
<script language="javascript">
/*
*设置一个层随滚动条滚动
*/
function scrollDiv(id,duration)
{
var scrollDivEl = $("#"+id);
var menuYloc = scrollDivEl.offset().top;
$(window).scroll(function (){
var offsetTop = menuYloc + $(window).scrollTop() +"px";
scrollDivEl.animate({top : offsetTop },{ duration:duration || 350 , queue:false });
});
}
$(document).ready(function(){
scrollDiv("myDiv",350);
});
</script>
</head>
<body>
<div id="myDiv" style="position:absolute;left:20px;background:#555;width:100px;height:100px;" />
<div style="height:2000px;"></div>
</body>
</html>
文章浏览阅读5.8k次,点赞10次,收藏11次。最近IDEA换成了2021.1版本,在进行全局搜索的时候发现file mask中是空的,这就让我很难受,必须整回来修改步骤:1.找到IDEA的配置文件find.xml我的路径是:C:\Users\Letsuner\AppData\Roaming\JetBrains\IntelliJIdea2021.1\options【每个人的可能不一样】奉劝一句:不要直接在C盘搜索find.xml,你会发现搜了个寂寞,推荐使用Everything【秒出搜索结果】2.修改配置文件并保存<applicat_idea file mask
文章浏览阅读501次。一、详细步骤1、定义数据库参数:数据库IP、用户名、密码、端口、编码格式以及数据库操作句柄;2、连接数据库:输入指定数据库名称,建立连接并返回数据库句柄;3、新增数据:输入数据表名,以元组形式输入表头和所需新增数据,然后将数据插入到数据表中;4、查找数据表:根据数据表名和判断条件,查询数据表中相关数据;5、 修改数据表数据:输入数据表名,以元组形式输入表头和所需新增数据,然后将数据替换到数据表中;6、 删除数据表数据:根据数据表和相关判断条件,删除数据表中指定数据;7、主函数。..._mysqldb python查询
文章浏览阅读6.6k次,点赞3次,收藏70次。文章目录前言原题目运行效果项目环境项目阐述参考前言之前报名了学校Python比赛,题目很高大上,不过放心,我做的完全达不到这个深度。这个项目其实需要改进的地方还很多,不过作为简单的选课系统来说,基本功能均已实现。后续会继续完善上传到GitHub上面,有需要源码的可以先行联系我。到时候传到GitHub后也会贴出地址,供大家交流。原题目【题目名称】 区块链学分管理系统【背景说明】在当..._系统名称学生选课管理系统 开发环境python 3.10 + django + mysql 运行环境dja
文章浏览阅读4.5k次。我们呼叫一个目标分机,并向给本次呼叫指定一个自定义的uuid,应该是这样: originate {origination_uuid=xxxxxx-xxxxxx-xxxxxxx-xxxxx}user/1001 &park 在freeswitch的wiki和freeswitch权威指南中,都可以找到相关说明 但是两个分机相互拨打,那么每个分机的uuid都是系统生成的,默_origination_uuid effective_number
文章浏览阅读9.4k次,点赞6次,收藏23次。这是Schur引理的引理Schur引理的复矩阵版本和实矩阵版本摘自《矩阵论教程》第2版,张绍飞,p49_schur引理
文章浏览阅读531次。题目来源: HihoCoder1305题目要求: 给定两个区间集合A和B,其中集合A包含N个区间[A1,A2],[A3,A4],..., [A2n-1,A2n],集合B包含M个区间[B1,B2], [B3,B4], ..., [B2M-1, B2M]。求的A-B长度。 解答: A-B = A - A∩B。题目要求从A组中的所有区间中删去和B组_给定两个区间集合 a 和 b,其中集合 a 包含 n 个区
文章浏览阅读829次。Activities提供了一种方便管理的创建、保存、回复的对话框机制,例如 onCreateDialog(int), onPrepareDialog(int, Dialog), showDialog(int), dismissDialog(int)等方法,如果使用这些方法的话,Activity将通过getOwnerActivity()方法返回该Activity管理的对话框(dialog)._没有窗口时如何定义对话框的所有者
文章浏览阅读1.6k次。要求是MATLAB编写的根据身份证号码来进行识别,0~9和一个x来进行识别(不是通过姓名(汉字))识别要求最后能显示详细信息例如姓名:性别:身份证号:籍贯:
文章浏览阅读193次,点赞3次,收藏6次。探索ArcMap2SLD:GIS领域的效率提升利器项目地址:https://gitcode.com/sufan89/ArcMap2SLD项目简介ArcMap2SLD 是一个基于Python编写的开源工具,专为地理信息系统(GIS)用户设计。它旨在帮助用户将ArcGIS ArcMap中的图层样式快速转换为可共享的 Styled Layer Descriptor (SLD) 格式,从而实现地图样...
文章浏览阅读2.5k次。ISecurityInformation::GetSecurity 该函数通过句柄找到某一对象,并获取该对象的安全描述符。DWORD GetSecurityInfo( HANDLE handle, SE_OBJECT_TYPE ObjectType, SECURITY_INFORMATION SecurityInfo, PSID* ppsidOwner,_getsecurityinfo
文章浏览阅读6.7k次,点赞6次,收藏24次。uni-app基础教程_uniapp教程
文章浏览阅读80次。题目描述java实现class Solution { public List<Integer> grayCode(int n) { List<Integer> result = new LinkedList<>(); //1<<2 = 100(4) for (int i = 0; i &l...