Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将页面上使用的所有 SVG 图形放在精灵表中以降低 HTTP 请求。大多数精灵实际上都很小,所以我用background-size了很多。在某些情况下,背景图像故意没有完全填充分配的元素。是否仍然可以使用精灵表而不会“泄漏”表上的其他图形?
background-size
你是否在你的 CSS 中包含了“repeat: no-repeat”?
如果这不能解决问题,请尝试在图像精灵中进一步展开图像。