Get started with css-element-queries CDN

MIT licensed

CSS Element Queries: library for dynamic, element-based media queries.

Tags:
  • css
  • element
  • query

Stable version

Copied!

How to start using css-element-queries CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with css-element-queries CDN - cdnhub.io</title>
  <link rel="stylesheet" href="styles.css">
  <script src="https://cdn.cdnhub.io/css-element-queries/1.2.3/ElementQueries.min.js" defer></script>
</head>
<body>
  <div class="container">
    <button id="toggle">Toggle</button>
    <div class="box" data-element-query="(width < 300px)">
      This box will have a red background when the screen width is less than 300px.
    </div>
  </div>
  <script src="scripts.js"></script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions