Home > Mobile >  css automatically adds slash on render
css automatically adds slash on render

Time:07-22

I've added CSS to the page

@font-face {
  font-family: "feather";
  src:url("fonts/feather-webfont.eot");
  src:url("fonts/feather-webfont.eot?#iefix") format("embedded-opentype"),
      url("fonts/feather-webfont.woff") format("woff"),
      url("fonts/feather-webfont.ttf") format("truetype"),
      url("fonts/feather-webfont.svg#feather") format("svg");
  font-weight: normal;
  font-style: normal;

But, when render CSS. It automatically adds slash so CSS not working

CSS In DevTools

How can I remove slash when rendering CSS? Thank you!

CodePudding user response:

@font-face {
  font-family: "feather";
  src:url("/assets/admin/vendors/feather/fonts/feather-webfont.eot");
  src:url("/assets/admin/vendors/feather/fonts/feather-webfont.eot?#iefix") format("embedded-opentype"),
    url("/assets/admin/vendors/feather/fonts/feather-webfont.woff") format("woff"),
    url("/assets/admin/vendors/feather/fonts/feather-webfont.ttf") format("truetype"),
    url("/assets/admin/vendors/feather/fonts/feather-webfont.svg#feather") format("svg");
  font-weight: normal;
  font-style: normal;
}

i added assets path and it works

CodePudding user response:

Try change the path with "../fonts/" or "./fonts/" instead of "fonts/" if possible.

  •  Tags:  
  • css
  • Related