Html 带有复选标记的无序列表 list-style-positions-outside 文本在左侧垂直对齐

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18754141/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 13:19:05  来源:igfitidea点击:

Unordered List with checkmarks list-style-positions-outside Text aligned on the left vertically

htmlcsshtml-lists

提问by Tony States

I am trying to have an unordered list with check-marks and have my text line up in the left and not have my second line of text float to the left and go under the check-marks.

我正在尝试使用带复选标记的无序列表,并将我的文本排在左侧,而不是让我的第二行文本向左浮动并进入复选标记下方。

Does anyone know how to make this work?

有谁知道如何使这项工作?

回答by Gourav

The below code helps you in understanding. Here's a JSFiddle demo.

下面的代码可以帮助您理解。这是一个 JSFiddle 演示

li:before
{
    content: '?';   
    margin-left: -1em;
    margin-right: .100em;
}

ul
{
   padding-left: 20px;
   text-indent: 2px;
   list-style: none;
   list-style-position: outside;
}

Refer this link to get the tick mark: http://amp-what.com/#q=check%20mark

请参阅此链接以获取刻度线:http: //amp-what.com/#q=check%20mark

Paste the code in the content property of lito get the check mark. I hope this will help you. Please vote.

将代码粘贴到 的内容属性中li以获取复选标记。我希望这能帮到您。请投票。