css用list-style-type屬性後顯示到文字後面

來源:互聯網
上載者:User
css用list-style-type屬性後顯示到文字後面

那個黑點顯示在了日期地方是什麼問題,

第一種情況直接修改list-style-position:outside;為list-style-position:inside;沒有的話就加上去。

方法二:在list-style-position:outside;的情況下給列表符號留個位置來顯示,比如說給li加個屬性margin-left:50px;第二種情況直接刪掉浮動元素float即可。

擴充:list-style-type:定義列表樣式
disc: 點
circle: 圓圈
square: 正方形
decimal: 數字,例如1,2,3,,....,11,12,13
decimal-leading-zero: 十進位數,不足兩位的補齊前置0,例如: 01, 02, 03, ..., 98, 99
lower-roman: 小寫羅馬文字,例如: i, ii, iii, iv, v, ...
upper-roman: 大寫羅馬文字,例如: I, II, III, IV, V, ...
lower-greek: 小寫希臘字母,例如: α(alpha), β(beta), γ(gamma), ...
lower-latin: 小寫拉丁文,例如: a, b, c, ... z
upper-latin: 大寫拉丁文,例如: A, B, C, ... Z
armenian: 亞美尼亞數字
georgian: 喬治亞數字,例如: an, ban, gan, ..., he, tan, in, in-an, ...
lower-alpha: 小寫拉丁文,例如: a, b, c, ... z
upper-alpha: 大寫拉丁文,例如: A, B, C, ... Z
none: 無(取消所有的list樣式)
inherit:繼承
自訂圖片:list-style:square inside url

簡寫規則:list-style:square inside url('arrow.gif');前面藍色的square為列表符號list-style-type,中間紅色的inside為list-style-position定位器,最後面綠色的url是圖片路徑list-style-image,如果存在這個圖片就會覆蓋前面的square,如果不存在就用square顯示。

.cen5 li a{display:inline-block;width:480px;height:20px;line-height:20px;margin-top:3px}.ileft{display:inline-block}

你可以在文字前面自己寫一個黑點啊,或者是上傳一個圖片啊,比如<li><i></i>聯絡</li>
你可以在i中上傳一個背景圖啊,

相關文章

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.