溢出和列表样式类型不起作用。

时间:2021-11-08 19:41:27
* {
    padding: 0;
    margin: 0;
}
.test {
    overflow: hidden;
    height: 50px;
    margin-left: 50px;
}

Without * list style type is shown. How to show list-style-type with overflow and * style?

没有显示样式类型。如何显示带有溢出和*风格的列表样式?

jsfiddle: http://jsfiddle.net/hcFCs/

jsfiddle:http://jsfiddle.net/hcFCs/

Thanks.

谢谢。

3 个解决方案

#1


2  

You have to add padding-left to test class. Try this:

你必须在测试课上加上划桨。试试这个:

html:

html:

<div class="test">
    <ul>
        <li>description</li>
        <li>description</li>
        <li>description</li>
        <li>description</li>
        <li>description</li>
        <li>description</li>
    </ul>    
</div>

css:

css:

* {
    padding: 0;
    margin: 0;
}
.test {
    overflow: hidden;
    height: 50px;
    margin-left: 50px;
    padding-left:20px;
}

fiddle

小提琴

#2


0  

please add margin-left on li tag to make list visible

请在li标签上添加margin-left,使列表可见。

.test ul li {
    margin-left:20px
}

#3


0  

You can try below code:

你可以试试下面的代码:

Demo

演示

ul{margin-left:20px;}
.test {
  overflow: hidden;
  height: 50px;
  margin-left: 50px;
}

#1


2  

You have to add padding-left to test class. Try this:

你必须在测试课上加上划桨。试试这个:

html:

html:

<div class="test">
    <ul>
        <li>description</li>
        <li>description</li>
        <li>description</li>
        <li>description</li>
        <li>description</li>
        <li>description</li>
    </ul>    
</div>

css:

css:

* {
    padding: 0;
    margin: 0;
}
.test {
    overflow: hidden;
    height: 50px;
    margin-left: 50px;
    padding-left:20px;
}

fiddle

小提琴

#2


0  

please add margin-left on li tag to make list visible

请在li标签上添加margin-left,使列表可见。

.test ul li {
    margin-left:20px
}

#3


0  

You can try below code:

你可以试试下面的代码:

Demo

演示

ul{margin-left:20px;}
.test {
  overflow: hidden;
  height: 50px;
  margin-left: 50px;
}