过生日了
好快,又到了过生日的时候了!
[player loop="1" autoplay="1"]
好快,又到了过生日的时候了!
[player loop="1" autoplay="1"]
直接上代码:
<!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> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>IE6 fixed</title> <style type="text/css"> * { margin: 0px; padding: 0px; } body { _background-image: url(about:blank); /*用浏览器空白页面作为背景*/ _background-attachment: fixed; /* prevent screen flash in IE6 确保滚动条滚动时,元素不闪动*/ }#topNav { width: 980px; z-index: 100; /*设置浮动层次*/ overflow: visible; position: fixed; top: 50px; /* 其他浏览器下定位,在这里可设置坐标*/ _position: absolute; /*IE6 用absolute模拟fixed*/ _top: expression(documentElement.scrollTop + 50 + "px"); /*IE6 动态设置top位置*/ /* documentElement.scrollTop 设置浮动元素始终在浏览器最顶,可以加一个数值达到排版效果 */ background-color:#0000FF; height: 31px; } .show{ position:absolute; top:500px; left:400px; border:#ff0000 1px solid; } </style> </head> <body> <div class="jd_menu" id="topNav">1111</div> <div style="height:2000px"></div> <div class="show">show</div> <p> 利用给<body>设置固定的背景,防止滚动条滚动时的闪动;如果<body>中要设置滚动的背景而产生冲突,可以把代码写在html选择器里面,如: html { _background-image: url(about:blank); _background-attachment: fixed; /* prevent screen flash in IE6 */ } body { background-image: url(1.jpg); background-attachment: scroll; } </p> </body> </html>
来源jb51
<a onclick="SetHome(window.location)" href="javascript:void(0)">设为首页</a> | <a onclick="AddFavorite(window.location,document.title)" href="javascript:void(0)">加入收藏</a>
<script type="text/javascript" language="javascript">// <![CDATA[ //加入收藏 function AddFavorite(sURL, sTitle) { sURL = encodeURI(sURL); try{ window.external.addFavorite(sURL, sTitle); }catch(e) { try{ window.sidebar.addPanel(sTitle, sURL, ""); }catch (e) { alert("加入收藏失败,请使用Ctrl+D进行添加,或手动在浏览器里进行设置."); } } } //设为首页 function SetHome(url){ if (document.all) { document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage(url); }else{ alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!"); } } // ]]></script>
昨天在群里面,有人有个问题,就是iframe高度要是100%,想到了直接写高度100%。后来我想到了一个解决的办法,给那人提醒了,结果他写出来了,我还不知道怎么写。
思路是这样的,先获取屏幕的高度,然后改变iframe的高度。
废话不多说了,直接代码
<iframe id="userSrc" name="userSrc" src="" width="100%" marginheight="0" onLoad="iFrameHeight()"; marginwidth="0" frameborder="0"></iframe> <script type="text/javascript" language="javascript"> var fra = frames["userSrc"];var url = "http://123.126.51.201/";if(url)fra.location = url; function iFrameHeight(){ var ifm= document.getElementById("userSrc"); var pheight=window.screen.height; ifm.height = pheight; } </script>
DedeCms autoindex和itemindex 用法说明,让dedecms autoindex,itemindex 从0到1开始的办法
让dedecms autoindex,itemindex 从0到1开始的办法
[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global]
{dede:global name=itemindex runphp="yes"}@me=@me+1;{/dede:global}
autoindex itemindex 的使用心得区别
channelartlist 标签下使用 {dede:global name='itemindex' runphp='yes'}@me;{/dede:global}
自增1
arclist 标签下使用 [field:global.autoindex/] 默认从1开始
channel 标签下使用 [field:global.autoindex/] 默认从0开始
channelartlist 标签下使用 {dede:global.itemindex/} 默认从1开始
arclist 从0开始[field:global name=autoindex runphp="yes"]@me=@me-1;[/field:global]
channel 从1开始[field:global name=autoindex runphp="yes"]@me=@me+1;[/field:global][field:typename/]
channelartlist 从0开始{dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global}
<div id="h_pd_lm_{dede:global.itemindex/}" {dede:global name='itemindex' runphp='yes'}@me=(@me==1)?'':'style="display:none;"';{/dede:global} class="pd2_lmc_l1">
channelartlist实例
{dede:channelartlist notypeid='123,124,146,147'} <a class="pd2_lmt{dede:global name=itemindex runphp='yes'}@me=(@me==1)?'1':'3';{/dede:global}" onmouseover="showitem2({dede:global name=itemindex runphp='yes'}@me=@me-1;{/dede:global},'pd_lm','h_pd_lm_','pd2_lmt');" href='{dede:field name='typeurl'/}'> {dede:php}if($refObj->Fields['ispart']){echo $refObj->Fields['typename'];}{/dede:php} </a> {/dede:channelartlist}
标签下使用 [field:global name=autoindex/]
channel实例
{dede:channel titlelen='32'} <li [field:global name='autoindex' runphp='yes']if(@me%2==0){@me='class="rr"';}else{@me='';}[/field:global] ><h3><a href='[field:typelink/]'>[field:typename/]</a></h3></li> {/dede:channel}
在arclist中使用autoindex runphp 时用这种方式:
{dede:arclist titlelen='22' row='4' flag='c' orderby='id'} <a href="[field:arcurl /]" target="_blank">[field:title /]</a> [field:global name='autoindex' runphp='yes']if(@me==2){@me="<br />";}else{@me=' ';}[/field:global]{/dede:arclist}
自增1
[field:global.autoindex/]
arclist实例
{dede:arclist channelid=17 row=6 orderby=pubdate titlelen=40 addfields='docphoto,docjob,doctec' typeid='123,136,146,155,172,182,202'} <div id="h_nrr_zj_[field:global.autoindex/]" class="nrr_zjl" [field:global name='autoindex' runphp='yes']if(@me==1){@me="";}else{@me='style="display:none;"';}[/field:global] > <div><a href="[field:arcurl/]" title="[field:fulltitle/]" target="_blank"><img src="[field:litpic/]" alt="[field:fulltitle/]" /></a></div> </div> {/dede:arclist}
如何自由定义 开始的数字
autoindex/itemindex 可以使用 @me+1;实现由指定数字开始
遇到类似的问题做下这个笔记,在用到的时候可以灵活发挥!
list 标签下试用autoindex
{dede:list pagesize='40' orderby='id'} [field:global name='autoindex' runphp='yes']if(@me%10==0){@me="test";}else{@me='';}[/field:global] {/dede:list}