JS控制列表排序倒序

<!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=utf-8″ />
<title>无标题文档</title>
</head>
<body>
<ul id=”list”>
<li>5</li>
<li>4</li>
<li>3</li>
<li>2</li>
<li>1</li>
</ul>
<script language=”javascript”>
var lb=document.getElementById(‘list’).getElementsByTagName(‘li’);//查找到子元素额
var s=[];//创建数组
for (var i=0, j=lb.length; i<j; i++){
var li=lb[i];
s.push(li);//把元素放入数组
}
s.reverse();//数组倒序
for(var i=0, j=s.length; i<j;i++){
s[i].parentNode.appendChild(s[i]);//重新给列表赋值输出
}
</script>
</body>
</html>

PHPCMS V9 相关文章 排序问题

调用的相关文章默认为升序,切不支持 order
修改:
$r = $this->db->select($sql2, ‘*’, $limit,”,”,’id’);
为:
$r = $this->db->select($sql2, ‘*’, $limit, $order,”,”,’id’);
{pc:content action=”relation” relation=”$relation” id=”$id” catid=”$catid” num=”5″ order=”inputtime DESC” keywords=”$rs[keywords]”}

fullPage—下拉滚动翻屏带导航栏hover

一个简单的,易于使用的插件,创建全屏滚动网站(也被称为单页网站),它允许创建滚动网站以及添加一些水平滑块。适合做专题页面,有分类的单页,每页随着滚珠翻屏,每屏当中还可以继续插入其他JS效果。

fullPage

演示:http://alvarotrigo.com/fullPage/
下载:https://github.com/alvarotrigo/fullPage.js/archive/master.zip

One Page Scroll – 仿苹果单页面随鼠标滚动翻屏效果

单页滚动网站已经被广泛使用了有一段时间了,它们对于快速提供信息是很有用的。One Page Scroll 是一个 jQuery 插件,简化了创建此类网站的步骤,只需创建 HTML 结构,进行简单设置,然后调用函数就可以了。

效果演示:http://www.thepetedesign.com/demos/onepage_scroll_demo.html
下载:https://github.com/peachananr/onepage-scroll/archive/master.zip

html5 reset.css

/* HTML5 Doctor CSS Reset – 20140402 */
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}
body{line-height:1}
img{vertical-align:middle;}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
nav ul{list-style:none}
blockquote,q{quotes:none}
blockquote:before,blockquote:after,q:before,q:after{content:none}
a{margin:0;padding:0;font-size:100%;vertical-align:baseline;background:transparent}
ins{background-color:#ff9;color:#000;text-decoration:none}
mark{background-color:#ff9;color:#000;font-style:italic;font-weight:bold}
del{text-decoration:line-through}
abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}
table{border-collapse:collapse;border-spacing:0}
hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}
input,select{vertical-align:middle}

/* xoyoer*/
.z{float:left;display:inline}.y{float:right;display:inline}
.pr{ position:relative}.pa{ position:absolute}
.cl:after { content: “.”; display: block; height: 0; clear: both; visibility: hidden; } .cl { zoom: 1; }
.f12{font-size:12px;}.f14{font-size:14px;}.f16{font-size:16px;}.f18{font-size:18px;}.f20{font-size:20px;}.f23{font-size:23px;}.f30{font-size:30px;}
.dbno{display:none;}.db{display:block;}
.radius2{border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;}
.radius4{border-radius: 4px;-webkit-border-radius: 4px;-moz-border-radius: 4px;}

Media Screen

<!doctype html>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>Media Query Demos</title>
<style type=”text/css”>
.wrapper {
border: solid 1px #666;
padding: 10px;
margin: 20px;
}
.viewing-area span {
color: #666;
display: none;
}
/* max-width */
@media screen and (max-width: 600px) {
.one {
background: #f30;
}
span.lt600 {
display: inline-block;
}
}
/* min-width */
@media screen and (min-width: 900px) {
.two {
background: #f30;
}
span.gt900 {
display: inline-block;
}
}
/* min-width & max-width */
@media screen and (min-width: 600px) and (max-width: 900px) {
.three {
background: #f30;
}
span.bt600-900 {
display: inline-block;
}
}
/* max device width */
@media screen and (max-device-width: 480px) {
.iphone {
background: #ccc;
}
}
</style>
</head>
<body>
<div class=”wrapper one”>This box will turn to pink if the viewing area is less than 600px</div>
<div class=”wrapper two”>This box will turn to orange if the viewing area is greater than 900px</div>
<div class=”wrapper three”>This box will turn to blue if the viewing area is between 600px and 900px</div>
<div class=”wrapper iphone”>This box will only apply to devices with max-device-width: 480px (ie. iPhone)</div>
<p class=”viewing-area”><strong>Your current viewing area is:</strong>
<span class=”lt600″>less than 600px</span>
<span class=”bt600-900″>between 600 – 900px</span>
<span class=”gt900″>greater than 900px</span></p>
</body>
</html>

解决LNMP编辑WordPress主题scandir()错误方法

解决方法也是比较简单的,这是由于我们lnmp环境下的php.ini文件scandir()函数问题,我们只需要去掉这个函数就可以了。我们可以通过FTP或者VI编辑 /usr/local/php/etc/php.ini文件中,找到 disable_functions 后面的 scandir删除掉这个函数。

最后,我们通过SSH编译 /etc/init.d/php-fpm restart 重启php-fpm就可以了。

PS:比较奇怪的是lnmp我也安装过多次,也构架过wordpress还是第一次遇到这样的问题,老左相信也有其他站长遇到,所以记录下来帮助大家解决。