图片占位符

插件 Holder.js

图片占位符插件 holder.js 可以为图片生成一个占位符图片也可以为某个区域生成一个占位符图片。不依赖于 jquery 等第三方库。

Holder renders image placeholders on the client side using SVG.

使用方法:
Include holder.js in your HTML:

<script src="holder.js"></script>

Holder will then process all images with a specific src attribute, like this one:

![](holder.js/300x200)

The above tag will render as a placeholder 300 pixels wide and 200 pixels tall.

![](holder.js/300x200)

To avoid console 404 errors, you can use data-src instead of src.

PLACEHOLDER

使用方法:
Just put your image size after our URL and you'll get a placeholder image.
Like this:

http://via.placeholder.com/350x150

You can also use it in your code, like this:

<a href="https://placeholder.com"><img src="http://via.placeholder.com/350x150"></a>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • http://www.bootcdn.cn/holder/ 下载网址参考网址:http://www.51xued...
    Joeshu阅读 3,652评论 0 0
  • 当我们在进行网页的排版布局时,有时会需要放置些占位图片来丰富内容,手动生成这些占位图片的话,特别是尺寸要精确到像素...
    切糕糕阅读 5,118评论 0 0
  • jHipster - 微服务搭建 CC_简书[https://www.jianshu.com/u/be0d56c4...
    quanjj阅读 4,251评论 0 2
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,810评论 19 139
  • “大家好才是真的好!”李玟的这句广告词家喻户晓,不过卖的什么产品还真的不记得了。 我们从小接受的教育是:一朵红花不...
    梓荷阅读 2,642评论 0 5

友情链接更多精彩内容