Giter Site home page Giter Site logo

react-img-extend's Introduction

欢迎使用react图片扩展组件

此组件并无跨域问题,任何图片都可以使用,请放心使用

安装

 npm install react-img-extend --save

例子演示: https://dsmelon.github.io/react-img-extend/dist/index.html

api

参数名 类型 默认值 说明
className string 容器的类名
imgSrc string 图片的链接
direction string bottom 扩展方向 left: 向左扩展
right: 向右扩展
top: 向上扩展
bottom: 向下扩展
grid9: 九宫格扩展
withReverse boolean false 扩展时是否伴随着翻转 九宫格无效
rowRepeat number 1 扩展的像素行数 九宫格无效
split number[] [8,8,8,8] 九宫格切割断点 具体位置用法看下图
repeatType string stretch 九宫格填充类型 stretch: 拉伸
tile: 平铺

九宫格断点和填充类型说明

使用方法

<ImgExtend
    withReverse={true}
    rowRepeat="stretch"
    direction="bottom"
    imgSrc={src}
    ...其余配置
>
    你内部的内容
</ImgExtend>

github地址: https://github.com/dsmelon/react-img-extend

react-img-extend's People

Contributors

dsmelon avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.