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.
请帮助我,我在 magento 2 中创建了新的自定义主题,但我在将新的 css 文件添加到主题时遇到了问题。
为了您的信息,我已使用 composer 将代码部署到 pub 文件夹。Css 文件正在那里复制,但不包括那些到前端的文件。
最近在magento2中,我在catalog_product_view.xml中包含了css文件作为
<head> <css src="mage/gallery/styles-view.css"/> </head>
建议你从这里开始。
如本主题所述,将 CSS 添加为布局的一部分。
如果您有其他问题,请告诉我们。