美文网首页
holder.js 图片站位

holder.js 图片站位

作者: jh2k15 | 来源:发表于2018-05-21 12:02 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>

  </style>
</head>
<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/holder/2.9.4/holder.js"></script>
    <img data-src="holder.js/300x200?theme=sky&random=yes&bg=2a2025">

    theme: The theme to use for the placeholder. Example: holder.js/300x200?theme=sky
    random: Use random theme. Example: holder.js/300x200?random=yes
    bg: Background color. Example: holder.js/300x200?bg=2a2025
    fg: Foreground (text) color. Example: holder.js/300x200?fg=ffffff
    text: Custom text. Example: holder.js/300x200?text=Hello
    size: Custom text size. Defaults to pt units. Example: holder.js/300x200?size=50
    font: Custom text font. Example: holder.js/300x200?font=Helvetica
    align: Custom text alignment (left, right). Example: holder.js/300x200?align=left
    outline: Draw outline and diagonals for placeholder. Example: holder.js/300x200?outline=yes
    lineWrap: Maximum line length to image width ratio. Example: holder.js/300x200?lineWrap=0.5

    <img data-src="holder.js/200x200?auto=yes">
    <!-- <div id="myImage" style="width: 100px ;height: 100px"></div> -->

<!--     <script type="text/javascript">
      var myImage = document.getElementById('myImage');

      Holder.run({
        images: myImage
      });
    </script> -->

</body>
</html>

相关文章

  • holder.js 图片站位

  • 图片占位符

    插件 Holder.js 图片占位符插件 holder.js 可以为图片生成一个占位符图片也可以为某个区域生成一个...

  • 前端控件

    图片占位符生成器:holder.js使用

  • holder.js使用技巧

    很多童鞋刚开始使用holder.js进行图片占位时使用%死活显示不出来,解决的办法很简单,就是把%换成p,搞定!(...

  • GHMall仿京东要点统计一

    1、FadeInImage :加载网络图片,添加站位图。 2、ListView.builder和ListView ...

  • 图片占位符生成器:holder.js

    当我们在进行网页的排版布局时,有时会需要放置些占位图片来丰富内容,手动生成这些占位图片的话,特别是尺寸要精确到像素...

  • Glide用法

    1. 加载图片之前,先显示一个图片作为站位: 只需要调用 .placeHolder(), 用一个 drawable...

  • 当对手接发球挑球后,我方后场选手该如何处理?

    当我方发球时,我方两位选手是前后站位,前后站位又叫进攻站位,顾名思义,前后站位是最适合进攻的站位。 前场选手的主要...

  • 站位

    很多时候,人们总是习惯性的做有利于自己的事,为了一己私利去做事,全然不顾他人的感受,好像这世上只有自己一人...

  • 站位

    星星为什么总是翻动双眼 它在监视月亮和太阳 太阳月亮一旦暗恋 地球将没有白天夜晚 不要怨恨星星 银河也有暗礁险滩 ...

网友评论

      本文标题:holder.js 图片站位

      本文链接:https://www.haomeiwen.com/subject/tgsfjftx.html