我的网站一般都有很多要加载的图片。但我的主页实际上只有很少的图像,但每当我通过网站速度测试测试我的网站时,它会尝试在我的整个网站上加载我的所有图像。为什么不加载主页上的图像?为什么我所有子页面上的所有图像都会尝试加载到初始主页上?
答案 0 :(得分:0)
在style.css文件的顶部附近,您有一条规则,显然会从您的投资组合文件夹中预加载130张图片:
body:after
{
content: url(../images/portfolio/d-b-1-h.png) url(../images/portfolio/d-b-1-bw.png) url(../images/portfolio/d-b-2-h.png) url(../images/portfolio/d-b-2-bw.png) url(../images/portfolio/d-b-3-h.png) url(../images/portfolio/d-b-3-bw.png) url(../images/portfolio/d-b-4-h.png) url(../images/portfolio/d-b-4-bw.png) url(../images/portfolio/d-b-5-h.png) url(../images/portfolio/d-b-5-bw.png) url(../images/portfolio/d-b-6-h.png) url(../images/portfolio/d-b-6-bw.png) url(../images/portfolio/d-b-7-h.png) url(../images/portfolio/d-b-7-bw.png) url(../images/portfolio/d-b-8-h.png) url(../images/portfolio/d-b-8-bw.png) url(../images/portfolio/d-c-1-h.png) url(../images/portfolio/d-c-1-bw.png) url(../images/portfolio/d-c-2-h.png) url(../images/portfolio/d-c-2-bw.png) url(../images/portfolio/d-c-3-h.png) url(../images/portfolio/d-c-3-bw.png) url(../images/portfolio/d-c-4-h.png) url(../images/portfolio/d-c-4-bw.png) url(../images/portfolio/d-c-5-h.png) url(../images/portfolio/d-c-5-bw.png) url(../images/portfolio/d-c-6-h.png) url(../images/portfolio/d-c-6-bw.png) url(../images/portfolio/d-c-7-bw.png) url(../images/portfolio/d-c-7-h.png) url(../images/portfolio/d-c-8-bw.png) url(../images/portfolio/d-c-8-h.png) url(../images/portfolio/d-c-9-bw.png) url(../images/portfolio/d-c-9-h.png) url(../images/portfolio/d-c-10-bw.png) url(../images/portfolio/d-c-10-h.png) url(../images/portfolio/d-c-11-bw.png) url(../images/portfolio/d-c-11-h.png) url(../images/portfolio/d-cs-1-h.png) url(../images/portfolio/d-cs-1-bw.png) url(../images/portfolio/d-cs-2-h.png) url(../images/portfolio/d-cs-2-bw.png) url(../images/portfolio/d-cs-3-h.png) url(../images/portfolio/d-cs-3-bw.png) url(../images/portfolio/d-cs-4-h.png) url(../images/portfolio/d-cs-4-bw.png) url(../images/portfolio/d-cs-5-h.png) url(../images/portfolio/d-cs-5-bw.png) url(../images/portfolio/d-cs-6-h.png) url(../images/portfolio/d-cs-6-bw.png) url(../images/portfolio/d-cs-7-bw.png) url(../images/portfolio/d-cs-7-h.png) url(../images/portfolio/d-p-1-h.png) url(../images/portfolio/d-p-1-bw.png) url(../images/portfolio/d-p-2-h.png) url(../images/portfolio/d-p-2-bw.png) url(../images/portfolio/d-p-3-h.png) url(../images/portfolio/d-p-3-bw.png) url(../images/portfolio/d-p-4-h.png) url(../images/portfolio/d-p-4-bw.png) url(../images/portfolio/d-p-5-h.png) url(../images/portfolio/d-p-5-bw.png) url(../images/portfolio/d-p-6-h.png) url(../images/portfolio/d-p-6-bw.png) url(../images/portfolio/d-p-7-bw.png) url(../images/portfolio/d-p-7-h.png) url(../images/portfolio/d-p-8-bw.png) url(../images/portfolio/d-p-8-h.png) url(../images/portfolio/d-p-9-bw.png) url(../images/portfolio/d-p-9-h.png) url(../images/portfolio/d-p-10-bw.png) url(../images/portfolio/d-p-10-h.png) url(../images/portfolio/d-p-11-bw.png) url(../images/portfolio/d-r-1-h.png) url(../images/portfolio/d-r-1-bw.png) url(../images/portfolio/d-r-2-h.png) url(../images/portfolio/d-r-2-bw.png) url(../images/portfolio/d-r-3-h.png) url(../images/portfolio/d-r-3-bw.png) url(../images/portfolio/d-r-4-h.png) url(../images/portfolio/d-r-4-bw.png) url(../images/portfolio/d-r-5-h.png) url(../images/portfolio/d-r-5-bw.png) url(../images/portfolio/d-r-6-h.png) url(../images/portfolio/d-r-6-bw.png) url(../images/portfolio/d-r-7-bw.png) url(../images/portfolio/d-r-7-h.png) url(../images/portfolio/d-r-8-bw.png) url(../images/portfolio/d-r-8-h.png) url(../images/portfolio/d-r-9-bw.png) url(../images/portfolio/d-r-9-h.png) url(../images/portfolio/d-r-10-bw.png) url(../images/portfolio/d-r-10-h.png) url(../images/portfolio/d-r-11-bw.png) url(../images/portfolio/d-v-1-h.png) url(../images/portfolio/d-v-1-bw.png) url(../images/portfolio/d-v-2-h.png) url(../images/portfolio/d-v-2-bw.png) url(../images/portfolio/d-v-3-h.png) url(../images/portfolio/d-v-3-bw.png) url(../images/portfolio/d-v-4-h.png) url(../images/portfolio/d-v-4-bw.png) url(../images/portfolio/d-v-5-h.png) url(../images/portfolio/d-v-5-bw.png) url(../images/portfolio/d-v-6-h.png) url(../images/portfolio/d-v-6-bw.png) url(../images/portfolio/d-v-7-bw.png) url(../images/portfolio/d-v-7-h.png) url(../images/portfolio/d-w-1-h.png) url(../images/portfolio/d-w-1-bw.png) url(../images/portfolio/d-w-2-h.png) url(../images/portfolio/d-w-2-bw.png) url(../images/portfolio/d-w-3-h.png) url(../images/portfolio/d-w-3-bw.png) url(../images/portfolio/d-w-4-h.png) url(../images/portfolio/d-w-4-bw.png) url(../images/portfolio/d-w-5-h.png) url(../images/portfolio/d-w-5-bw.png) url(../images/portfolio/d-w-6-h.png) url(../images/portfolio/d-w-6-bw.png) url(../images/portfolio/d-w-7-bw.png) url(../images/portfolio/d-w-7-h.png) url(../images/portfolio/m-b-2-bw.png) url(../images/portfolio/m-c-2-bw.png) url(../images/portfolio/m-cs-3-bw.png) url(../images/portfolio/m-cs-5-bw.png) url(../images/portfolio/m-p-3-bw.png) url(../images/portfolio/m-r-3-bw.png) url(../images/portfolio/m-v-2-bw.png) url(../images/portfolio/m-w-3-bw.png);
display: none;
}
似乎你应该将其删除或修剪它或将其移动到投资组合页面,这样它就不会被不必要地加载。