【问题标题】:What are the ways to include new css file into magento 2将新的css文件包含到magento 2中的方法是什么
【发布时间】:2015-12-16 06:16:57
【问题描述】:

请帮助我,我在 magento 2 中创建了新的自定义主题,但我在将新的 css 文件添加到主题时遇到了问题。

为了您的信息,我已使用 composer 将代码部署到 pub 文件夹。 Css 文件正在那里复制,但不包括那些到前端的。

【问题讨论】:

    标签: magento2 magento-2.0


    【解决方案1】:

    建议你开始here

    按照in this topic 的讨论将您的 CSS 添加为布局的一部分。

    如果您还有其他问题,请告诉我们。

    【讨论】:

      【解决方案2】:

      最近在 magento2 中,我在 catalog_product_view.xml 中包含了 css 文件

      <head>
          <css src="mage/gallery/styles-view.css"/>
      </head>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-05-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-05-16
        相关资源
        最近更新 更多