追求編程之美

          先做人,再做技術人員,最后做程序員。
          數據加載中……

          2009年7月24日

          css學習之背景

          CSS 允許應用純色作為背景,也允許使用背景圖像創建相當復雜的效果。CSS 在這方面的能力遠遠在 HTML 之上

          背景色

           

          可以使用background-color 屬性為元素設置背景色,這個屬性接受任何合法的顏色值。

          這條規則把元素的背景設為灰色:p{background-color :gray;}

          如果你希望背景色從元素中的文本向外至少有延伸,只需增加一些內邊框:p {background-color: gray; padding: 20px;}background-image 屬性的默認值是 none,表示背景上沒有放置任何圖像。

          背景圖像

          要把圖像放入背景,需要使用  background-image 屬性

          posted @ 2009-10-25 17:17 yanZhangWu 閱讀(194) | 評論 (0)編輯 收藏
          date_trunc函數的用法

          9.9.2. date_trunc

          The function date_trunc is conceptually similar to the trunc function for numbers.

           

          date_trunc('field', source)

          source is a value expression of type timestamp or interval. (Values of type date and time are cast automatically, to timestamp or interval respectively.) field selects to which precision to truncate the input value. The return value is of type timestamp or interval with all fields that are less significant than the selected one set to zero (or one, for day and month).

          Valid values for field are:

           

          microseconds
          milliseconds
          second
          minute
          hour
          day
          week
          month
          quarter
          year
          decade
          century
          millennium

           

           

          Examples:

          SELECT date_trunc('hour', TIMESTAMP '2001-02-16 20:38:40');
          Result: 2001-02-16 20:00:00
          SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40');
          Result: 2001-01-01 00:00:00

           

          posted @ 2009-07-24 07:02 yanZhangWu 閱讀(12957) | 評論 (0)編輯 收藏
          主站蜘蛛池模板: 永丰县| 福泉市| 垦利县| 苗栗市| 闸北区| 商都县| 子长县| 定兴县| 长兴县| 临安市| 保康县| 南川市| 镇康县| 山丹县| 布尔津县| 金湖县| 洪洞县| 仙居县| 通榆县| 河东区| 巴东县| 长沙市| 龙井市| 库伦旗| 石阡县| 陇西县| 垦利县| 都兰县| 东至县| 施甸县| 桃源县| 霍林郭勒市| 武安市| 商河县| 麦盖提县| 团风县| 南涧| 烟台市| 板桥市| 法库县| 长沙市|