CSS背景與列表

來源:互聯網
上載者:User

標籤:

  • CSS中背景的使用
  • CSS中列表的使用

15.1 CSS中背景的使用

        屬性名稱                             屬性值                                 說明

        background-attachment     scroll            設定背景映像會隨視窗滾動

    條的移動而移動。    

                                                     fixed             設定背景映像不會隨視窗捲軸

    的移動而移動。

     

        background-color        十六進位                 background-color:#ff0000;

                              英文名稱              background-color:red;

                              三原色                 background-color:rgb(255,0,0)

                             transparent     background-color:transparent;透明

 

        background-image         URL                background-image:url("bg.jpg")

                   背景圖片

                                                    none                   不設定背景圖片

 

        background-position       top left           設定背景圖案出現在上左方。

                                                     top center         設定背景圖案出現在上方中間。

                                                     top right          設定背景圖案出現在上右方。

                                                     center left        設定背景圖案出現在中間左方。

                                                     center center      設定背景圖案出現在IE中間。

                                                     center right       設定背景圖案出現中間右方。

                                                     bottom left        設定背景圖案出現在下左方。

                                                     bottom             設定背景圖案出現在正下方。

                                                     bottom right       設定背景圖案出現在下右方。

                        

        background-repeat        repeat            將背景圖案填滿整個背景。

                                                   repeat-x          將背景圖案在水平方向添滿。

                                                   repeat-y          將背景圖案在垂直方向添滿。

                                                   no-repeat         圖案只出現一次。

 

            背景圖案簡化方案:

            background:顏色 背景圖片 repeat attachment position

            例:background:blue url("xxx.jpg") no-repeat fixed center center

 

15.2 CSS中列表的使用

        

            屬性名稱            屬性值            說明

            list-style-type      none             無符號

                                disc              實體的小圓點。

                                circle            空心的小圓點。

                                square            實心的小方塊。

                                decimal            1,2,3...

                                lower-roman        i,ii,iii...

                                upper-roman        I,II,III...

                                lower-alpha        a,b,c,d,e...

                                upper-alpha        A,B,C,D,E...

                

            list-style-position inside            清單項目較往右移。

                                 outside            清單項目正常顯示。

            list-style-image     URL             list-style-image:url(lmk.gif)

                                 none            不會顯示任何圖象

 

            清單的簡化設定:

            list-style:circle inside url("bullet.gif")   

CSS背景與列表

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.