yardan

Weak men wait for opportunity, but the strong men make it.

2008年11月22日

(转)css把超出的部分显示为省略号的方法兼容火狐

 1    1.  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">  
 2    2. <html>  
 3    3. <head>  
 4    4. <meta http-equiv="Content-Type" c>  
 5    5. <title>css把超出的部分显示为省略号的方法兼容火狐</title>  
 6    6. <style>  
 7    7. * { margin: 0; padding: 0; }   
 8    8. a { text-decoration: none; color: #000; }   
 9    9. a:hover { text-decoration: none; color: #000; }   
10   10. ul {   
11   11. width: 300px;   
12   12. margin: 40px auto;   
13   13. padding: 12px 4px 12px 24px;   
14   14. border: 1px solid #D4D4D4;   
15   15. background: #F1F1F1;   
16   16. }   
17   17. li { margin: 12px 0; }   
18   18. li a {   
19   19. display: block;   
20   20. width: 80px;   
21   21. overflow: hidden;/*注意不要写在最后了*/   
22   22. white-space: nowrap;   
23   23. -o-text-overflow: ellipsis;   
24   24. text-overflow: ellipsis;   
25   25. }   
26   26. /* firefox only */   
27   27. li:not(p) {    
28   28. clear: both;   
29   29. }   
30   30. li:not(p) a {   
31   31. max-width: 170px;   
32   32. float: left;   
33   33. }   
34   34. li:not(p):after {   
35   35. content: "";   
36   36. float: left;   
37   37. width: 25px;   
38   38. padding-left: 5px;   
39   39. color: #000;   
40   40. }   
41   41. </style>  
42   42. </head>  
43   43. <body>  
44   44. <ul>  
45   45. <li><href="#">suntear的技术空间</a></li>  
46   46. <li><href="#">suntear的技术空间</a></li>  
47   47. <li><href="#">suntear的技术空间</a></li>  
48   48. <li><href="#">suntear的技术空间</a></li>  
49   49. <li><href="#">suntear的技术空间</a></li>  
50   50. <li><href="#">suntear的技术空间</a></li>  
51   51. <li><href="#">suntear的技术空间</a></li>  
52   52. </ul>  
53   53. </body>  
54   54. </html>  
55 

posted @ 2008-11-22 14:10 YarDan 阅读(626) | 评论 (0)编辑 收藏

SQL Select语句完整的执行顺序【转】

、from子句组装来自不同数据源的数据; 
2、where子句基于指定的条件对记录行进行筛选; 
3、group by子句将数据划分为多个分组; 
4、使用聚集函数进行计算; 
5、使用having子句筛选分组; 
6、计算所有的表达式; 
7、使用order by对结果集进行排序。

举例说明: 在学生成绩表中 (暂记为 tb_Grade), 把 "考生姓名"内容不为空的记录按照 "考生姓名" 分组, 并且筛选分组结果, 选出 "总成绩" 大于 600 分的.
标准顺序的 SQL 语句为:
Select 考生姓名, max(总成绩) as max总成绩
from tb_Grade
where 考生姓名 is not null
group by 考生姓名
having max(总成绩) > 600
order by max总成绩
在上面的示例中 SQL 语句的执行顺序如下:
(1). 首先执行 FROM 子句, 从 tb_Grade 表组装数据源的数据
(2). 执行 WHERE 子句, 筛选 tb_Grade 表中所有数据不为 NULL 的数据
(3). 执行 GROUP BY 子句, 把 tb_Grade 表按 "学生姓名" 列进行分组
(4). 计算 max() 聚集函数, 按 "总成绩" 求出总成绩中最大的一些数值
(5). 执行 HAVING 子句, 筛选课程的总成绩大于 600 分的.
(7). 执行 ORDER BY 子句, 把最后的结果按 "Max 成绩" 进行排序.


posted @ 2008-11-22 10:47 YarDan 阅读(644) | 评论 (0)编辑 收藏

一个很简单的用jquery做的tab切换[转]

 1 # !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
 2 <html xmlns="http://www.w3.org/1999/xhtml">  
 3 <head>  
 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  
 5 <style>  
 6 # #menu ul li{display:inline;}   
 7 # .on {color:red;}   
 8 # .off {color:blue;}   
 9 # #list_new2{display:none;}   
10 </style>  
11 <script src="http://www.google.com/jsapi"></script>  
12 <script>google.load("jquery""1");</script>     
13 </head>  
14 <body>  
15 #   
16 #   
17 <div id="menu">  
18 #         <ul><li id="new1" class="on">标签1</li> <li id="new2" class="off">标签2</li></ul>  
19 </div>  
20 #   
21 <div id="list_new1">  
22 <ul>  
23 <li>标签1</li>  
24 <li>标签1</li>  
25 </ul>  
26 </div>  
27 <div id="list_new2">  
28 <ul>  
29 <li>标签2</li>  
30 <li>标签2</li>  
31 </ul>  
32 </div>  
33 #   
34 #   
35 <script type="text/javascript">  
36 <!--   
37 # $("#menu li").click(function()   
38 # {   
39 #         $("#menu li").each(function()   
40 #          {   
41 #                 $(this).removeClass("on");   
42 #                 $(this).addClass("off");   
43 #                 $("#list_"+$(this).attr("id")).hide();   
44 #          });   
45 # $(this).removeClass("off");   
46 # $(this).addClass("on");   
47 # $("#list_"+$(this).attr("id")).show();   
48 # }   
49 # );   
50 //-->  
51 </script>  
52 </body>  
53 </html>  

posted @ 2008-11-22 10:39 YarDan 阅读(1618) | 评论 (0)编辑 收藏

2008年11月17日

CSS在线编辑器

http://www.zhaophp.com/CssDesigner/

posted @ 2008-11-17 14:31 YarDan 阅读(566) | 评论 (0)编辑 收藏

仅列出标题  
<2024年3月>
252627282912
3456789
10111213141516
17181920212223
24252627282930
31123456

导航

统计

公告

擅一艺微长,便算读书种子。

留言簿(1)

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜