简体   繁体   中英

Using images as bullet points

I am having a problem using images as bullet points- bullet points are positioned like I want with bullet points that have only one line of text, but when they have more than one line of text then bullet points don't start from the start, but in the middle. Is there any way around using weird image canvas hacks to position these 2 bullet points? Is the best solution to use another images (with huge bottom canvas for example) for these 2 bullets to fix this problem?

Here is what I am talking about:

Second bullet point is positioned incorrectly here:
第二个要点在此处的位置不正确 Last bullet point is positioned incorrectly here: 在此处输入图片说明

HTML:

<ul class="service-box__list">
              <li class="service-box__item">
                Võtame enda kanda kogu igapäevase kinnisvarahalduse, sh ka kõik omaniku kohustused;
              </li>
              <li class="service-box__item">
                Pakume kinnisvara korrashoidu, tarbimis (nt. elekter, küte, vesi, kanalisatsiooni ning kommunikatsioon)
                -ja tugiteenused (nt parkimiskorraldus, valvesüsteemid);
              </li>
              <li class="service-box__item">
                Dokumenteerimine objektiga seotud infovahetuse oma digitaalsesse andmebaasi;
              </li>
              <li class="service-box__item">
                Organiseerimine kõik vajalikud ehitus- ja remonditööd;
              </li>
              <li class="service-box__item">
                Koostame perioodilised eelarved ning aruandluse vastavalt Sinu äri vajadustele ja isikupäradele;
              </li>
              <li class="service-box__item">
                Viime läbi objektiga seonduvate andmete regulaarse analüüsi, et parandada hoone võtmenäitajaid.
              </li>
</ul>

CSS:

&__list {
    list-style: none;
}

&__item {
    font-size: $default-font-size;
    background: url('./../img/roheline-leht-2.png') no-repeat left;
    padding-left: 2.5rem;  
}

Use list-style-image

ul {
    list-style-image: url('image.png');
}

In your example:

.service-box__list {
    list-style-image: url('../../img/roheline-leht-2.png');
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM