suchen

Heim  >  Fragen und Antworten  >  Hauptteil

Javascript – Hintergrund:URL-Problem in weniger

Hintergrund: URL (${@http}/img/icon/daorug@2x.png) No-Repeat-Center 3rem / automatisch 25 %;

@http ist eine Variable
Es wäre unrealistisch und unmöglich zu analysieren!

Was soll ich tun?

ringa_leeringa_lee2865 Tage vor649

Antworte allen(2)Ich werde antworten

  • 淡淡烟草味

    淡淡烟草味2017-05-19 10:32:55

    找到答案了 应该是background: url('@{http}/img/icon/daorug@2x.png') no-repeat center 3rem / auto 25%;

    Antwort
    0
  • 为情所困

    为情所困2017-05-19 10:32:55

    调用方式错了,不用那个美元符号

    @http: http://www.yoursite.com;   // 对变量@http的定义, 习惯上写在less文件开头
    
    background: url(@http/img/icon/daorug@2x.png) no-repeat center 3rem / auto 25%;

    Antwort
    0
  • StornierenAntwort