问答详情
源自:7-5 飘花效果的实现

url改为本地地址时,为什么会报错

    var snowflakeURl = [
        '../images/2016_08_02/snowflake/snowflake1.png',
        '../images/2016_08_02/snowflake/snowflake2.png',
        '../images/2016_08_02/snowflake/snowflake3.png',
        '../images/2016_08_02/snowflake/snowflake4.png',
        '../images/2016_08_02/snowflake/snowflake5.png',
        '../images/2016_08_02/snowflake/snowflake6.png'
    ];

http://img.mukewang.com/57a455a3000139f811420278.jpg

提问者:湛瞳 2016-08-05 17:00

个回答

  • 慕沐8222582
    2019-04-02 19:16:54

    其实写成相对路径也可以,我的就是这样

  • 湛瞳
    2016-08-08 09:26:55

    已解决,写成绝对路径就可以了,直接写图片的位置,而不是相对于该js文件的http://img.mukewang.com/57a7dfd90001191005820351.jpg

  • 摩西摩西
    2016-08-06 23:17:59

    图片路径写错了,使用相对路径