Ordered list showing all zeros in IE9

前端 未结 11 581
眼角桃花
眼角桃花 2020-12-03 04:55

I have an

    (ordered list) and in FF, Safari, Chrome it is rendered correctly. However in IE9 it is showing all zeros. It is not a spacing/padding is
11条回答
  •  死守一世寂寞
    2020-12-03 05:02

    Had a similar problem with Edge on Windows 10. It was showing 0s next to list items within an on a mobile menu that opened using a css transition. Felt like I tried a hundred variants of list-style: none; and list-style-type: none; on the ol, its parents and descendants.

    Ended up with this to fix it in Edge / IE but not mess with the styling that worked for every other desktop and mobile browser:

    /*
      Hack for Edge browser. Some things never change...
      This is definitely dirty, hacky and overkill.
      Without this, Edge on windows 10 shows a 0. next to every list item in a mobile menu that is animated with a css transition on our site.
      Using technique for targeting Edge from https://stackoverflow.com/questions/32201586/how-to-identify-microsoft-edge-browser-via-css
      Answer by KittMedia: https://stackoverflow.com/a/32202953/
    */
    @supports (-ms-ime-align: auto) {
      .element-im-targeting ol,
      .element-im-targeting ol li,
      .element-im-targeting ol * {
        list-style: none;
        list-style-type: none;
      }
    }
    

提交回复
热议问题