当前位置: 编程技术>移动开发
本页文章导读:
▪增添浮动的view 添加浮动的view
// 布局
FrameLayout.LayoutParams lp_Bottom = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT);
// 设置广告出现的位置(悬浮于底部)
lp_Bottom.gravit.........
▪ 把尿神器(为了宝贝疙瘩。) 把尿神器(为了小宝宝。。。。)
上周周日去我哥家看了看我的大侄子(小宝宝),很可爱,逗着他玩儿,一会撒个尿,撒尿前,我吹口哨,一会他就撒出来了,于是乎:周一晚上:准备.........
▪ 鼠标容易跟随提示二 鼠标简单跟随提示二
function id(s){
return document.getElementById(s);
}
/**
* 鼠标跟随提示
*/
function mouseFollow() {
var e = e ? e : window.event;
var posx = e.clientX;
var posy = e.clientY;
var followDiv = id("followDiv") ? i.........
[1]增添浮动的view
来源: 互联网 发布时间: 2014-02-18
添加浮动的view
// 布局 FrameLayout.LayoutParams lp_Bottom = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT); // 设置广告出现的位置(悬浮于底部) lp_Bottom.gravity = Gravity.BOTTOM; fatherView.addView(childView, lp_Bottom)
[2] 把尿神器(为了宝贝疙瘩。)
来源: 互联网 发布时间: 2014-02-18
把尿神器(为了小宝宝。。。。)
上周周日去我哥家看了看我的大侄子(小宝宝),很可爱,逗着他玩儿,一会撒个尿,撒尿前,我吹口哨,一会他就撒出来了,于是乎:周一晚上:准备资料,小想法:把尿神器 就开发出来了。
把尿神器主要针对宝宝,像我们这种大男人带小孩,把尿的时候,会吹口哨也就算了.不会吹口哨的咋办,还不急死;尤其是小宝宝,使用它可以轻松撒尿耶,应用从实用开始!
刚刚当爸爸的赶快下载此应用,安装上为你家的宝宝使用吧!
个人感觉还很实用!
1 楼
雨花台舞水
前天
[3] 鼠标容易跟随提示二
来源: 互联网 发布时间: 2014-02-18
鼠标简单跟随提示二
function id(s){
return document.getElementById(s);
}
/**
* 鼠标跟随提示
*/
function mouseFollow() {
var e = e ? e : window.event;
var posx = e.clientX;
var posy = e.clientY;
var followDiv = id("followDiv") ? id("followDiv"): document.createElement("div");
followDiv.setAttribute("id","followDiv");
var css = "width:100px;height:20px;border:1px solid grey;position:absolute;z-index:10000;left:"+posx+";top:"+posy+";";
setCss(followDiv,css);
document.body.appendChild(followDiv);
}
/**
* element:需要获取样式的目标元素;name:样式属性
*/
function getStyle(element, name) {
var computedStyle;
try {
computedStyle = document.defaultView.getComputedStyle(element, null);
} catch (e) {
computedStyle = element.currentStyle;
}
if (name != "float") {
return computedStyle[name];
} else {
return computedStyle["cssFloat"] || computedStyle["styleFloat"];
}
}
/**
* element:需要设置样式的目标元素;name:样式属性;value:设置值
*/
function setStyle(element, name, value) {
if (name != "float") {
element.style[name] = value;
} else {
element.style["cssFloat"] = value;
element.style["styleFloat"] = value;
}
}
/**
*
*/
function setCss(obj,css){
obj.setAttribute("style",css);
obj.style.cssText = css;
}
最新技术文章: