position

心得笔记

一个人想着一个人 提交于 2019-12-04 15:41:48
1. 页首和页尾如何定住?------使用position:fixed;top:10px;left:0; .header { position: fixed; top: 0; left: 0; width: 100%; } .footer { position: fixed; bottom: 0; left: 0; width: 100%; }    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="../statics/vue.min.js"></script> <!-- 引入样式 --> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> <!-- 引入组件库 --> <script src="https://unpkg.com/element-ui/lib/index.js"></script> <style> body { margin: 0; padding: 0; } .header { position: fixed; top: 0; left: 0; width: 100%; } .footer {

IOS get position

对着背影说爱祢 提交于 2019-12-04 15:27:59
I have a lot of button inside a UIScrollView and i am trying to get their position on button click. Here is my code: UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(2, 0, 262, 748)]; scrollView.contentSize=CGSizeMake(262, 816); scrollView.bounces=NO; scrollView.delaysContentTouches=YES; buton1 = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; buton1.frame = CGRectMake(2, 0, 262, 102); buton1.bounds = CGRectMake(2, 0, 262.0, 102.0); [buton1 setTag:1]; [buton1 setImage:[UIImage imageNamed:@"left_gride.png"] forState:UIControlStateNormal]; [buton1 addTarget:self

2019-2020-1 《数据结构与面向对象程序设计》实验七报告

半城伤御伤魂 提交于 2019-12-04 15:21:32
# 20182327 2019-2020-1 《数据结构与面向对象程序设计》实验七报告 课程:《程序设计与数据结构》 班级: 1823 姓名:赵天昊 学号:20182327 实验教师:王志强 实验日期:2019年10月30日 必修/选修: 必修 1.实验内容 1.定义一个Searching和Sorting类,并在类中实现linearSearch,SelectionSort方法,最后完成测试。 要求不少于10个测试用例,提交测试用例设计情况(正常,异常,边界,正序,逆序),用例数据中要包含自己学号的后四位 2.重构你的代码 把Sorting.java Searching.java放入 cn.edu.besti.cs1823.(姓名首字母+四位学号) 包中(例如:cn.edu.besti.cs1823.G2301) 把测试代码放test包中 3.参考http://www.cnblogs.com/maybe2030/p/4715035.html ,学习各种查找算法并在Searching中补充查找算法并测试 4.补充实现课上讲过的排序方法:希尔排序,堆排序,二叉树排序等(至少3个) 测试实现的算法(正常,异常,边界) 5.编写Android程序对实现各种查找与排序算法进行测试,提交运行结果截图 2.实验过程和结果 实验一: 实验二: 实验三: //线性查找 public static

html5获取自己定位的方法

♀尐吖头ヾ 提交于 2019-12-04 15:20:45
html5获取自己定位的方法 直接用高德地图api 不要用百度地图api 不准确 <pre> <!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width"> <title>浏览器定位</title> <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/> <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=00955dce4bad4be3ec81058776e0e307"></script> <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script> <body> <div style="width:30px; height:30px;

recyclerview刷新

痞子三分冷 提交于 2019-12-04 15:07:30
notifyDataSetChanged() 调用此方法后,仅刷新屏幕以内的item,当下次滑动让屏幕外item进来,则再执行onBindViewHolder()进行刷新 notifyItemChanged(int position) 仅更新指定的position的item notifyItemRangeChanged() position数据发生了改变,那调用这个方法,就会回调对应position的onBindViewHolder()方法了,因为ViewHolder是复用的, 所以如果position在当前屏幕以外,也就不会回调了,下次position滚动会当前屏幕以内的时候同样会调onBindViewHolder()方法刷新数据了。 notifyItemInserted(position :int) 这个方法是在第position位置被插入了一条数据的时候可以使用这个方法刷新 notifyItemMoved(int fromPosition, int toPosition) 这个方法是从fromPosition移动到toPosition为止的时候可以使用这个方法刷新 notifyItemRangeInserted(int positionStart, int itemCount) 批量添加。 notifyItemRemoved(int position)

纯CSS 常见3D实例

怎甘沉沦 提交于 2019-12-04 15:04:37
一、正方体 我认为正方体可以算是3D图像的基础吧,首先正方体是由六个相同的面所组成,其次就需要我们依次构造。(据体构造在代码中) 成平图如下: 代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>正方体</title> <style> .d3{ height: 300px; width:300px; perspective: 800px; margin:140px auto; border:1px solid #ccc; } .stage{ height: 300px; width: 300px; transform-style: preserve-3d; position: relative; transform: rotateX(45deg) rotateY(45deg); } .role{ height: 300px; width: 300px; position: absolute; } .stage{ animation:

css 3D动画

泪湿孤枕 提交于 2019-12-04 14:25:56
一、今天让我们来学习一下css 3D吧! 1.首先我们要学习好css3 3d一定要有一定的立体感! 2.再来那就聊聊原理吧! 3.css3 3d 顾名思义是由两个2d名片组成的 但不是让你建立连个2d啊! 一个div要想又3d效果那就得在最外层建立一个3d平面. transform-style: preserve-3d; 3d空间 perspective: 800px; 它被成为视距或者紧身. 但是要是相对与body是不是也得给div上一层也得加一个紧身呢! 有了3d效果是不是的有一个像眼镜一样的东西呢 在不同的地方显示的效果也是不一样的 perspective-origin:50% 50%; 这就是你的眼镜啦 位置不同效果也就不用了 这样我们的3d空间就已经建立成了。 4、3d无非就是通过X Y Z轴来进行操作 rotateX/rotateY/rotateZ可以帮助理解三维坐标 translateZ则可以帮你理解透视位置。 transform-origin我们成为基点 在水平方向改变观看div的位置 scale 缩放 rotate 旋转 translate移动 skew倾斜 通过这些来进行3d效果 代码如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"

CSS to achieve a similar fixed floating div thast always on top of other divs - like stackoverflow does?

强颜欢笑 提交于 2019-12-04 13:16:56
问题 I'd like to achieve a similar effect as the one in this image: Basically, I want to have a div as a menu bar that's always on top - the div beneath it being the container div for my content. Clicking any links in my menu bar only change the content in the container div. 回答1: You need to use the position: fixed; property for #top div. <div id="top"></div> #top { position:fixed; top:0px; width:100%; height:70px; } 回答2: You need to have a div and assign the CSS classes: .className { width: 100%;

Binding a Popup to another control's relative screen position

可紊 提交于 2019-12-04 13:01:46
I'm writing an XBAP with a complex Popup (Canvas Z-index of 99 with a grid on it...) that I would like to "attach" to the button that opens it and follow that button around wherever it goes on the screen. For example, if the button is in a ListBox or an XamDataGrid I would like the popup to follow the button as it scrolls through. If it is beneath an Expander I want it to stay attached to the button when the expander forces it to move, etc. Any Ideas? When using a Popup , neither PlacementTarget nor CustomPopupPlacementCallback is used after the popup has originally appeared. So any use of

Android: Using item selected in AutoCompleteTextView to populate another field

梦想与她 提交于 2019-12-04 12:44:23
问题 I am trying to build an app where the names of employees are stored in a table. On a particular page, the user can enter the name of an employee in an autocompletetextview and select one of the suggestions that pop-up. Based on what was selected, I want to populate other fields on the screen. For this I am returning a 2d string array from the SQL Lite database read containing the arrays name, dept, desg etc... The name array feeds in the Auto Complete view. Now the issue is with the index