作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
知道如何在 Next.JS 11 中使用图像组件中的新模糊占位符,正如在 https://nextjs.org/blog/next-11#image-placeholders 上宣布的那样?
<Image
src={banner}
alt={name}
layout="responsive"
width={1920}
height={675}
quality={100}
placeholder="blur"
blurDataURL={bannerBlurHash} // Here bannerBlurHash code as data url ?
priority
/>
干杯,
最佳答案
我构建了一个快速实用程序,用于从输入图像生成 blurhash 的数据 URL 并使用 blurhash 参数。生成的数据 URL 可以用作 Next.js Image 的 blurDataURL
(仍在进行中,但功能正常)
关于next.js - 如何将 blurha.sh 与新的 Next.JS 图像组件一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68113389/
我是一名优秀的程序员,十分优秀!