日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
CSS學(xué)習(xí)筆記--CSS列表-創(chuàng)新互聯(lián)

不同的列表項(xiàng)標(biāo)記

list-style-type屬性指定列表項(xiàng)標(biāo)記的類型是:

玉屏ssl適用于網(wǎng)站、小程序/APP、API接口等需要進(jìn)行數(shù)據(jù)傳輸應(yīng)用場(chǎng)景,ssl證書未來市場(chǎng)廣闊!成為創(chuàng)新互聯(lián)的ssl證書銷售渠道,可以享受市場(chǎng)價(jià)格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:028-86922220(備注:SSL證書合作)期待與您的合作!
ul.a{list-style-type: circle;}
ul.b{list-style-type: square;}
 
ol.c{list-style-type: upper-roman;}
ol.d{list-style-type: lower-alpha;}

作為列表項(xiàng)標(biāo)記的圖像

要指定列表項(xiàng)標(biāo)記的圖像,使用列表樣式圖像屬性:

ul
{
    list-style-image: url('sqpurple.gif');
}

上面的例子在所有瀏覽器中顯示并不相同,IE和Opera顯示圖像標(biāo)記比火狐,Chrome和Safari更高一點(diǎn)點(diǎn)。

瀏覽器兼容性解決方案

同樣在所有的瀏覽器,下面的例子會(huì)顯示的圖像標(biāo)記:

ul
{
    list-style-type: none;
    padding: 0px;
    margin: 0px;
}
ul li
{
    background-image: url(sqpurple.gif);
    background-repeat: no-repeat;
    background-position: 0px 5px; 
    padding-left: 14px; 
}

例子解釋:

  • ul:
    • 設(shè)置列表樣式類型為沒有刪除列表項(xiàng)標(biāo)記
    • 設(shè)置填充和邊距0px(瀏覽器兼容性)
  • ul中所有l(wèi)i:
    • 設(shè)置圖像的URL,并設(shè)置它只顯示一次(無重復(fù))
    • 您需要的定位圖像位置(左0px和上下5px)
    • 用padding-left屬性把文本置于列表中

列表 -簡(jiǎn)寫屬性

在單個(gè)屬性中可以指定所有的列表屬性。這就是所謂的簡(jiǎn)寫屬性。

為列表使用簡(jiǎn)寫屬性,列表樣式屬性設(shè)置如下:

ul
{
    list-style: square url("sqpurple.gif");
}

可以按順序設(shè)置如下屬性:

  • list-style-type
  • list-style-position (有關(guān)說明,請(qǐng)參見下面的CSS屬性表)
  • list-style-image

如果上述值丟失一個(gè),其余仍在指定的順序,就沒關(guān)系。

 所有不同的CSS列表項(xiàng)標(biāo)記。

ul.a{list-style-type:circle;}
ul.b{list-style-type:disc;}
ul.c{list-style-type:square;}

ol.d{list-style-type:armenian;}
ol.e{list-style-type:cjk-ideographic;}
ol.f{list-style-type:decimal;}
ol.g{list-style-type:decimal-leading-zero;}
ol.h{list-style-type:georgian;}
ol.i{list-style-type:hebrew;}
ol.j{list-style-type:hiragana;}
ol.k{list-style-type:hiragana-iroha;}
ol.l{list-style-type:katakana;}
ol.m{list-style-type:katakana-iroha;}
ol.n{list-style-type:lower-alpha;}
ol.o{list-style-type:lower-greek;}
ol.p{list-style-type:lower-latin;}
ol.q{list-style-type:lower-roman;}
ol.r{list-style-type:upper-alpha;}
ol.s{list-style-type:upper-latin;}
ol.t{list-style-type:upper-roman;}

ol.u{list-style-type:none;}
ol.v{list-style-type:inherit;}


本文標(biāo)題:CSS學(xué)習(xí)筆記--CSS列表-創(chuàng)新互聯(lián)
當(dāng)前URL:http://www.dlmjj.cn/article/dojpsi.html