Git Product home page Git Product logo

steps's Introduction

steps

先看一下目录结构: steps目录

介绍

1.0 文件夹和 2.0 文件夹非升级关系,两者仅是着重点方向不一致,1.0 主打双边显示,2.0 主打内容排序,一般功能的话两者均可满足。

steps.js是基于原生JavaScript的组件,可用于展示步骤条、时间轴等,功能支持:

  1. 自适应
  2. 支持横向和纵向显示,并且横向还支持居中显示
  3. 支持自定义间距
  4. 主轴线上下左右单方向及多方向分布(1.0) / 线、标题、描述、自定义等可自由排序(2.0)
  5. 支持数字和圆点及自定义图标,也可以使用图片
  6. 如果标题和详情还不足以满足您的需求,你还可以插入自定义的html代码
  7. 如果样式不满意,可以加入自定义的父类class,然后根据css的权重重新定义样式

demo地址:

浏览器支持情况

https://caniuse.com/#search=flex, 由于布局中主要使用的是flex布局,所以支持IE10以上以及现代主流浏览器。 建议使用前先在你所要用的浏览器上查看demo。

资源

首先需要引入样式文件steps.css:

<link rel="stylesheet" href="steps.css">

接下来引入steps.js:

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

使用

在使用的时候,需要一个容器,例如:

<div id="steps1"></div>

然后在 JavaScript 中进行初始化:

var steps1 = steps({
    el: "#steps1",
    data: [
        { title: "步骤1", description: "111" },
        { title: "步骤2", description: "222" },
        { title: "步骤3", description: "desc步骤3步骤3" }
    ],
    active: 1
});

参数

steps's People

Contributors

fxss5201 avatar

Watchers

 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.