前端 - 提问关于background-image不显示的问题
PHP中文网
PHP中文网 2017-04-17 11:34:00
0
3
471

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

PHP中文网
PHP中文网

认证0级讲师

reply all(3)
大家讲道理

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...

左手右手慢动作

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

迷茫

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();

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template