2013-06-24工作日志

1、利用union all 时 需要排序 order by 只能在最后一个语句处增加排序 并且排序字段只能为列数 如:

select miid,posttime,optime,title,ispublic,rsid from supermarket a where isrecommend = 2 and rsid = 1 and rownum <= 3 

union all

select miid,posttime,optime,title,ispublic,rsid from supermarket where isrecommend = 2 and rsid = 3 and rownum <= 3

union all

select miid,posttime,optime,title,ispublic,rsid from supermarket where isrecommend = 2 and rsid = 0 and rownum <= 3 order by 3 desc,2 desc

 

2、URL 优化 改变正则表达式 匹配路径

 

/list{cate:(?:(?:c|t)(?:[\\d]+)(?:-[\\d]+){0,2})?}{brand:(?:b[\\d]+)?}{order:(?:o[\\d]+)?}{page:(?:p[\\d]+)?}

?:   表示重复零次或一次

c|t:  c或者t开头的字母

[\\d]:代表数字

+:    重复一次或者更多次

{0,2}:重复至少0次,至多2

 

红色分类,蓝色品牌,紫色排序,绿色分页

 

listt73-226-227b79o21p1

 

listt73-226-227o21

 

listt73-226-227b79

 

listt73-226-227b79o21

 

  3、CSS

重置初始值:

 

/*CssReset:0*/

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,select,input,textarea,p,table,th,td {padding:0;margin:0;} 

table {border-spacing:0;border-collapse:collapse;} 

img {border:none;} 

strong,th,em,b,i {font-weight:normal;font-style:normal;} 

ol,ul {list-style:none;} 

th {text-align:left;} 

h1 {font-size:18px;}

h2 {font-size:16px;}

h3 {font-size:14px;font-weight:normal;}

dt,h4,h5,h6 {font-weight:normal;font-size:100%;} 

button,input,select,textarea{font-size:100%;vertical-align:middle;}

a {text-decoration:none;}

a:hover {text-decoration:underline;}

::selection {background-color:#ff8000;color:#fff;}

/*CssReset:1*/

 

优先级属性:

 

z-index:999; 数字越大优先级越高

 

相对定位relative-绝对定位absolute:

position:relative; 相对于上一级设置了absolute的模块进行定位 其中可设置top,bottom,left,right 来进行偏移定位位置

position:absolute;

引用:

 

绝对定位(absolute):将被赋予此定位方法的对象从文档流中拖出,使用left,right,top,bottom等属性相对于其最接近的一个最有定位设置的父级对象进行绝对定位,如果对象的父级没有设置定位属性,即还是遵循HTML定位规则的,则依据body对象左上角作为参考进行定位。绝对定位对象可层叠,层叠顺序可通过z-index属性控制,z-index值为无单位的整数,大的在最上面,可以有负值(目前负值FF不支持)。

相对定位(relative):对象不可层叠,依据left,right,top,bottom等属性在正常文档流中偏移自身位置。同样可以用z-index分层设计。

 

posted @ 2013-06-24 14:40  晓晓軍  阅读(199)  评论(0)    收藏  举报