“Pr list style position”的版本间差异
本页内容
(创建页面,内容为“{{DISPLAYTITLE:list-style-position}}3 = CSS list-style-position 属性 = 规定列表中列表项目标记的位置: <sample title="" desc="" lang="html" hererun="1"> ul { list-style-position: inside; } </sample> <run name=""> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style type="text/css"> ul.inside { list-style-position: inside } ul.outside { list-style-position: outside } </style>…”) |
无编辑摘要 |
||
第68行: | 第68行: | ||
{| class="table table-striped table-hover" | {| class="table table-striped table-hover" | ||
! 属性 | ! 属性 | ||
! | ! Chrome | ||
! | ! Internet Explorer / Edge | ||
! | ! Firefox | ||
! | ! Safari | ||
! | ! Opera | ||
|- | |- | ||
| list-style-position | | list-style-position |
2022年8月19日 (五) 04:30的版本
CSS list-style-position 属性
规定列表中列表项目标记的位置:
示例
ul {
list-style-position: inside;
}
属性定义及使用说明
list-style-position属性指示如何相对于对象的内容绘制列表项标记。
默认值: | outside |
继承: | yes |
版本: | CSS1 |
JavaScript 语法: | object.style.listStylePosition="inside" |
浏览器支持
表格中的数字表示支持该属性的第一个浏览器版本号。
属性 | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
list-style-position | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
属性值
值 | 描述 |
---|---|
inside | 列表项目标记放置在文本以内,且环绕文本根据标记对齐。 |
outside | 默认值。保持标记位于文本的左侧。列表项目标记放置在文本以外,且环绕文本不根据标记对齐。 |
inherit | 规定应该从父元素继承 list-style-position 属性的值。 |
相关文章
CSS 教程: CSS 列表
CSS 参考手册: list-style 属性