Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

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


Save Automatically?

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.


  <ul class="clearfix">
		    <li><a href="#section1">Секция 1</a></li>
		    <li><a href="#section2">Секция 2</a></li>
		    <li><a href="#section3">Секция 3</a></li>

<section id="section1">
	<h3>Первая секция</h3>
	<p><button class="goto" data-anchor="#section2">Перейти к секции 2</button></p>
<section id="section2">
	<h3>Вторая секция</h3>
	<p><button class="goto" data-anchor="#section3">Перейти к секции 3</button></p>
<section id="section3">
	<h3>Третья секция</h3>
	<p><button class="goto" data-anchor="#section1">Перейти к секции 1</button></p>


                .clearfix:after {
  content: "";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;

nav {
  width: 100%;
  background-color: #051945;

ul {
	list-style: none;
  width: 249px;

ul:hover li a {
  color: grey;

ul li {
	float: left;
  line-height: 30px;

ul li a {
  color: #FFF;
  text-decoration: none;
  margin: 15px 10px;

ul li:hover a {
  color: #22EBBE;

section {
  margin-bottom: 100%;


  $('button.goto').on('click', function(event) {
    // отменяем стандартное действие
    var sc = $(this).data("anchor"),
        dn = $(sc).offset().top;
    * sc - в переменную заносим информацию о том, к какому блоку надо перейти
    * dn - определяем положение блока на странице
    $('html, body').animate({scrollTop: dn}, 1000);
    * 1000 скорость перехода в миллисекундах