久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <small id='OHYai'></small><noframes id='OHYai'>

      <tfoot id='OHYai'></tfoot>
      <legend id='OHYai'><style id='OHYai'><dir id='OHYai'><q id='OHYai'></q></dir></style></legend>

        <bdo id='OHYai'></bdo><ul id='OHYai'></ul>
    1. <i id='OHYai'><tr id='OHYai'><dt id='OHYai'><q id='OHYai'><span id='OHYai'><b id='OHYai'><form id='OHYai'><ins id='OHYai'></ins><ul id='OHYai'></ul><sub id='OHYai'></sub></form><legend id='OHYai'></legend><bdo id='OHYai'><pre id='OHYai'><center id='OHYai'></center></pre></bdo></b><th id='OHYai'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='OHYai'><tfoot id='OHYai'></tfoot><dl id='OHYai'><fieldset id='OHYai'></fieldset></dl></div>
      1. 緩存在 SASS 文件中鏈接的破壞圖像

        Cache busting images which are linked inside SASS files(緩存在 SASS 文件中鏈接的破壞圖像)
        <tfoot id='EPy1c'></tfoot>
      2. <i id='EPy1c'><tr id='EPy1c'><dt id='EPy1c'><q id='EPy1c'><span id='EPy1c'><b id='EPy1c'><form id='EPy1c'><ins id='EPy1c'></ins><ul id='EPy1c'></ul><sub id='EPy1c'></sub></form><legend id='EPy1c'></legend><bdo id='EPy1c'><pre id='EPy1c'><center id='EPy1c'></center></pre></bdo></b><th id='EPy1c'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EPy1c'><tfoot id='EPy1c'></tfoot><dl id='EPy1c'><fieldset id='EPy1c'></fieldset></dl></div>
          1. <legend id='EPy1c'><style id='EPy1c'><dir id='EPy1c'><q id='EPy1c'></q></dir></style></legend>

            <small id='EPy1c'></small><noframes id='EPy1c'>

              <bdo id='EPy1c'></bdo><ul id='EPy1c'></ul>

                    <tbody id='EPy1c'></tbody>
                  本文介紹了緩存在 SASS 文件中鏈接的破壞圖像的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我對 Laravel 5.0 相當陌生,但對 PHP 不是.我一直在使用 Elixir 來編譯我的 SASS,從我的資源目錄復制圖像并通過 mix.version 函數運行它們以防止緩存.

                  I'm fairly new to Laravel 5.0, but not to PHP. I've been playing around with Elixir to compile my SASS, copy images from my resource directory and run them through the mix.version function to prevent caching.

                  不過,這對 CSS、圖像和 JavaScript 非常有用;是否也可以讓 Elixir 緩存在我的 CSS/SASS 中鏈接的圖像?當然,對圖像進行版本控制很容易,但有沒有辦法調整 CSS 以反映新的文件名?

                  This works great for CSS, images and JavaScript, however; is it possible to have Elixir cache-bust the images linked in my CSS/SASS as well? Sure it's easily enough to version the images but is there a way of adjusting the CSS to reflect the new filenames?

                  我發現了這個:https://github.com/trentearl/gulp-css-網址調整器它允許您將查詢參數附加到 CSS 文件中的文件路徑,這樣就解決了一半的問題.如果可以在每次 gulp 運行時自動更改查詢參數,我會很樂意使用它.

                  I discovered this: https://github.com/trentearl/gulp-css-url-adjuster which allows you to append a query parameter to the file paths in a CSS file, so that is half of the problem solved. I would be quite happy to use this if it were possible to automatically change the query parameter each time gulp runs.

                  有什么想法可以實現,或者是否有可能?

                  Any thoughts on how this can be achieved, or if it is even possible?

                  我想這樣做的原因是我一直在開發我的應用程序,并且我使用一個經常重新排列的大型精靈表,緩存破壞是一項要求,如果它可以在 gulp 運行時自動運行,那將節省我很多時間和精力.

                  The reasons I would like to do this is I'm constantly developing my app and I use a large sprite sheet which is often rearranged, cache busting is a requirement, and if it could be automatic when gulp runs that would save me a lot of time and effort.

                  謝謝

                  推薦答案

                  使用@Amo 的答案作為靈感,我最終使用的解決方案是一個 mixin,它利用了 unique_id() 函數生成隨機值.這避免了必須定義自定義 SASS 函數,因此它更簡單,正如@Amelia 指出的那樣,也更簡潔.

                  Using the answer from @Amo for inspiration, the solution I ended up using was a mixin, which makes use of the unique_id() function to generate a random value. This avoids having to define a custom SASS function, so it's simpler and as @Amelia pointed out, a bit cleaner too.

                  混入

                  @mixin background-cache-bust($url) {
                      background-image: #{'url('} + $url + #{'?v='} + unique_id() + #{')'};
                  }
                  

                  示例

                  .sprite {
                      @include background-cache-bust('/build/images/common/sprite.png');
                  }
                  

                  結果

                  .sprite {
                      background-image: "url(/build/images/common/sprite.png?v=u95ab40e0)";
                  }
                  

                  這篇關于緩存在 SASS 文件中鏈接的破壞圖像的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  CSS3 Transition ( Vendor Prefixes) crashes Safari immediately(CSS3 過渡(供應商前綴)立即使 Safari 崩潰)
                  @font-face crashes IE8(@font-face 讓 IE8 崩潰)
                  jquery limit text by length(jquery按長度限制文本)
                  Floated Child Elements: overflow:hidden or clear:both?(浮動子元素:溢出:隱藏或清除:兩者?)
                  How to tell Gulp to skip or ignore some files in gulp.src([...])?(如何告訴 Gulp 跳過或忽略 gulp.src([...]) 中的某些文件?)
                  • <bdo id='IkPdU'></bdo><ul id='IkPdU'></ul>

                    <small id='IkPdU'></small><noframes id='IkPdU'>

                    <tfoot id='IkPdU'></tfoot>
                  • <legend id='IkPdU'><style id='IkPdU'><dir id='IkPdU'><q id='IkPdU'></q></dir></style></legend>

                        <tbody id='IkPdU'></tbody>

                          1. <i id='IkPdU'><tr id='IkPdU'><dt id='IkPdU'><q id='IkPdU'><span id='IkPdU'><b id='IkPdU'><form id='IkPdU'><ins id='IkPdU'></ins><ul id='IkPdU'></ul><sub id='IkPdU'></sub></form><legend id='IkPdU'></legend><bdo id='IkPdU'><pre id='IkPdU'><center id='IkPdU'></center></pre></bdo></b><th id='IkPdU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IkPdU'><tfoot id='IkPdU'></tfoot><dl id='IkPdU'><fieldset id='IkPdU'></fieldset></dl></div>
                          2. 主站蜘蛛池模板: 国产三级一区二区 | 午夜男人视频 | 午夜精品久久久久久 | 免费av观看 | 国产精品一区一区 | 亚洲精品久久久一区二区三区 | 第四色狠狠 | 911影院 | av在线一区二区 | 久久在线 | 亚洲三区在线观看 | 97色免费视频 | 成人不卡 | 99免费在线视频 | 日本在线一区二区 | 国产亚洲二区 | 国产区一区二区三区 | 久久久久久亚洲 | 国产一区二区免费 | 国产盗摄视频 | 午夜精品一区二区三区在线观看 | 久久不射电影网 | 亚洲一区国产精品 | 亚洲成人一区 | 亚洲免费在线视频 | 亚洲女人天堂成人av在线 | 亚洲成人精品在线 | 久久99久久98精品免观看软件 | 成人影院免费视频 | 2019天天干天天操 | 国产精品美女久久久久aⅴ国产馆 | 91美女在线观看 | 亚洲三区在线观看 | 久久香焦 | 日韩欧美在线一区 | 日本手机在线 | 久久久久国产一区二区三区四区 | 国产精品久久久久久中文字 | 国产高清在线精品 | 中文字幕免费视频 | 欧美一级黄视频 |