List style question

the current list style is as follows:

clipboard.png
:
overflow: hidden;


clipboard.png

although the effect of overflow has been made, the icon on the left has disappeared. I would like to ask you how to solve it. It can achieve the effect of displaying ellipsis, and the icon is still there.

the current html code is as follows:
< ul class = "ul-catalog" id = "catalogList" >

        <li 
            <span>dsadsddas(222)</span>              
        </li>
        <li 
            <span>a(222)</span>              
        </li>
    </ul>

css code is as follows:
ul.ul-catalog {

list-style: none;
font-size: 15px;
color: rgba(255,255,255,0.6);
font-family: ;
margin: 0;
padding: 8px 10px;
box-sizing: border-box;
width : 300px;
height: 450px;
overflow: auto;

}
.ul-catalog li {

position: relative;
padding: 5px 0px 5px 5px;
margin-left: 21px;
line-height: 19px;
white-space: nowrap;
cursor: pointer;

}

.ul-catalog li:before {

content: "";
display: block;
position: absolute;
top: 8px;
left: -15px;
width: 10px;
height: 14px;
background-image: url(../images/bg/tree-btn.png);

}

Css
Mar.01,2021

Open the console to view the problem of insufficient horizontal width under style adjustment. Fine-tuning ~


changing the padding value can solve


try using the ellipsis on ul-catalog li span

Menu