li标签:list-style

ul/ol >> li标签,感叹于CSS的魔法力

list-style可以定义ul、ol中li的样式,list-style默认值为disc,如果没有继承关系,就会显示实心圆点。

list-style语法:
list-style :list-style-type  |  list-style-position  |  list-style-image
//可以不设置其中的某个值,比如 "list-style:circle inside;" 也是允许的,未设置的属性会使用其默认值。

支持的list-style-type值如下

none             无标记。
disc             默认。标记是实心圆。
circle           标记是空心圆。
square           标记是实心方块。
decimal          标记是数字。
decimal-leading-zero 0开头的数字标记。(01, 02, 03, 等。)
lower-roman      小写罗马数字(i, ii, iii, iv, v, 等。)
upper-roman      大写罗马数字(I, II, III, IV, V, 等。)
lower-alpha      小写英文字母(a, b, c, d, e, 等。)
upper-alpha      大写英文字母 (A, B, C, D, E, 等。)
lower-greek      小写希腊字母(alpha, beta, gamma, 等。)
lower-latin      小写拉丁字母(a, b, c, d, e, 等。)
upper-latin      大写拉丁字母(A, B, C, D, E, 等。)
hebrew           传统的希伯来编号方式
armenian         传统的亚美尼亚编号方式
georgian         传统的乔治亚编号方式(an, ban, gan, 等。)
cjk-ideographic  简单的表意数字
hiragana         标记是:a, i, u, e, o, ka, ki, 等。(日文片假名)
katakana         标记是:A, I, U, E, O, KA, KI, 等。(日文片假名)
hiragana-iroha   标记是:i, ro, ha, ni, ho, he, to, 等。(日文片假名)
katakana-iroha   标记是:I, RO, HA, NI, HO, HE, TO, 等。(日文片假名)
  • 4
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
请帮助我把每一行代码写上注释:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- <link href="./1321.css" type="text/css"/> --> <title>导航栏</title> <style> *{ margin: 0; padding: 0; box-sizing:border-box; font-family:"Poppins",sans-serif; } .cantainer{ width:100%; height:100vh; background-color: #e092a1; background-size: 100% 100%; display:flex; align-items: center; justify-content: center; } nav{ background: #fff; border-radius: 50px; padding: 10px; box-shadow: 0 25px 20ox -20px rgba(0 , 0, 0, 0.4); } nav ul li{ list-style: none; display: inline-block; padding: 13px 35px; margin: 10px; font-size: 18px; font-weight: 500; color: #777; cursor: pointer; position: relative; z-index: 2; transform: color 0.5s; } nav ul li::after{ content:''; background:#f44566; width: 100%; height: 100%; border-radius: 30px; position: absolute; top: 100%; left: 50%; transform: translate(-50% ,-50%); z-index: -1; opacity: 0; transition:top 0.5s,opacity 0.5s; } nav ul li:hover{ color: #fff; } nav ul li:hover:after{ top:50%; opacity: 1; } a{ text-decoration: none; color: #706363; text-decoration: none; } .enen{ width: 10%; height: 10%; } </style> </head> <body> <div class="cantainer"> <nav> <ul> <li ><a href="">1</a></li> <li ><a href="">2</a></li> <li ><a href="">3</a></li> <li ><a href="">4</a></li> <li ><a href="">5</a></li> <li ><a href="" >6</a></li> </ul> </nav> </div> </body> </html>
05-30

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值