GithubHelp home page GithubHelp logo

hichembenchaaben / responsive-elements Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kumailht/responsive-elements

0.0 3.0 0.0 272 KB

Responsive elements makes it possible for any element to adapt and respond to the area they occupy. It's a tiny javascript library that you can drop into your projects today.

License: MIT License

responsive-elements's Introduction

##Responsive Elements Responsive elements makes it possible for any element to adapt and respond to the area they occupy. It's a tiny javascript library that you can drop into your projects today.

Feedback, bugs, questions? email me, I'll respond quickly, promise!

###Example

###Usage

####1. Load jQuery and responsive-elements.js right before your closing </head> tag

<script src="jquery.min.js"></script>
<script src="responsive-elements.js"></script>

####2. Explicitly declare which elements you want to be responsive using a data-respond attribute

<div class="quote" data-respond>

####3. Use 'less than' and 'greater than' classes as breakpoints to write responsive CSS

.quote.lt500 {background: blue}
.quote.gt150.lt300 {background: red}

####4. Optionally declare start, end and interval values on your data-respond attribute to control breakpoint generation

<div class="quote" data-respond="start: 100px; end: 900px; interval: 50px;">
  • Start: What pixel value should breakpoint generation start at
  • End: What pixel value should breakpoints end at
  • Interval: How many pixels between breakpoints

responsive-elements's People

Contributors

kumailht avatar

Watchers

 avatar  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.