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.
我正在使用 html5 标记、jquery 和 css3 并向产品的用户显示图像。
如果产品图片未显示,我需要显示默认图片。
正在考虑是否在图像标签上设置一个 css 类以显示默认图像,但让图像标签上的 src 具有真实的产品图像。如果未找到,则显示类默认图像。
这对css是否可行,如果可以,如何?