星期二 阴转小雨 18~24℃
腹泻实战经验之:不宜吃炒饭尤其是蛋炒饭
前几天吃肉丝炒饭,感觉不是特别明显,昨晚吃网丝蛋炒饭,今天早上起床感觉就明显了。尽管特别交待了油不要放太多,不过还是吃不消。
一方面是油的原因,一方面是蛋的原因。
valign 在 css 中的写法:vertical-align
直接写在 td 中:
<td valign="top">
写在 css 样式中:
<td style="vertical-align:top">
table 属性 border、cellspacing、cellpadding 在 css 中的写法
<table border="0" cellspacing="0" cellpadding="0">
写在 css 样式中:
table { border:0; border-collapse:collapse }
td { padding:0 }
悬浮导航 js
昨天记了一个,今天再记一个:
来自:http://bbs.blueidea.com/thread-2621730-1-1059.html
<style type="text/css">
#topbar{
position:absolute;
border: 1px solid black;
padding: 2px;
background-color: lightyellow;
width: 620px;
visibility: hidden;
z-index: 100;
}
</style>
<script type="text/javascript">
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 3 //set y offset of bar in pixels
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
var verticalpos="fromtop"
function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}
function staticbar(){
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY – ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
ftlObj.y += (pY – startY – ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}
if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>
<div id="topbar">
<a href="" onClick="closebar(); return false"><img src="http://www.smallrain.net/jsimg/close1.gif" border="0" /></a>
这里显示内容
</div>
<div style="height:1200px">test</div>
《商界》、《活法》
今天和同事聊到看书,同事提到一本杂志和一本书:
《商界》杂志
《活法》- 稻盛和夫
发表评论