search

Home  >  Q&A  >  body text

前端 - 提问关于background-image不显示的问题

我往td里加了个background-image,但没有任何反应,上面有报错信息,我尝试过往url(''),url(""),../ 但是都不行,请问这是怎么回事?我是想给一个表格里的tr都图片,但是这实现不了,这是为什么?

PHP中文网PHP中文网2782 days ago459

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 11:36:00

    http://yulei521.github.io/segmentFault_question_demo/background_logo_table.html You can refer to this to see how to add the image path. I also added the image in td... It should be that the path is wrong. If you have any questions, please discuss...

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 11:36:00

    The error is very obvious. The image file cannot be found. Check whether the path is written correctly

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:36:00

    Several possible situations at present

    1. Linux-like directory ../ represents the upper-level directory, ./ represents the current directory, please add and test it

    2. It may be related to the browser’s inability to access local files, mainly the webkit-kernel Google Chrome. But it’s unlikely at the moment

    3. Try background: url();

    reply
    0
  • Cancelreply