1. 相对路径(掌握) html文件与图片文夹处于同级时:src=”img1.jpeg”html文件和存方图片的文件夹同级时:src=”images/img1.jpeg”图片在html文件的上级时:src=”../img1.jpeg” 2. 绝对路径(了解) 从指定盘符开始:src=”F:\workspace\WebStorm\HelloWorld\images\img1.jpeg”
留言