我往td里加了个background-image,但没有任何反应,上面有报错信息,我尝试过往url(''),url(""),../ 但是都不行,请问这是怎么回事?我是想给一个表格里的tr都图片,但是这实现不了,这是为什么?
认证0级讲师
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
Linux-like directory ../ represents the upper-level directory, ./ represents the current directory, please add and test it
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
Try background: url();
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
Linux-like directory ../ represents the upper-level directory, ./ represents the current directory, please add and test it
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
Try background: url();