Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="filters-button">
    <a href="#" class="filter-btn filter-active" data-filter="*">Все элементы</a>
    <a href="#" class="filter-btn" data-filter=".blue">Синие</a>
    <a href="#" class="filter-btn" data-filter=".green">Зеленые</a>
    <a href="#" class="filter-btn" data-filter=".yellow">Желтые</a>
    <a href="#" class="filter-btn" data-filter=".grey">Серые</a>

<div class="grid">
  <div class="grid-item grey"></div>
  <div class="grid-item blue"></div>
  <div class="grid-item green"></div>
  <div class="grid-item blue"></div>
  <div class="grid-item blue"></div>
  <div class="grid-item green"></div>
  <div class="grid-item yellow"></div>
  <div class="grid-item green"></div>


                .filters-button {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  margin: 20px 0 50px 0;

.filter-btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  width: 150px;
  padding: 15px 20px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 200ms linear;
  background: #323323;

.filter-btn:hover {
  background: #737373;

.grid {
  border: 1px solid #333;

.grid-item {
  position: relative;
  float: left;
  width: 100px;
  height: 100px;
  margin: 5px;
  padding: 10px;
  background: #888;
  color: #262524;

.grey {background: grey;}
.blue {background: blue;}
.green {background: green;}
.yellow {background: yellow;}


                let grid = new Isotope('.grid', {
  itemSelector: '.grid-item',
  layoutMode: 'fitRows'

let filterBtn = document.querySelectorAll('.filters-button .filter-btn');
for (let i = 0; i < filterBtn.length; i++) {
  filterBtn[i].onclick = function (click) {
    let filterData ='data-filter');
      filter: filterData