Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                <h1>Встраивание фото с unsplash.com</h1>
<h2>Случайное фото одного автора</h2>
<img src="https://source.unsplash.com/user/aaronburden/" alt="random author photo">
<h2>Случайное фото одного автора с отметкой Like</h2>
<img src="https://source.unsplash.com/user/marslady/likes/800x400" alt="marslady like">
<h2>Случайное фото из раздела Collections</h2>
<img src="https://source.unsplash.com/collection/1118894/1200x600" alt="collection random photo">
<h2>Фото дня</h2>
<img src="https://source.unsplash.com/daily" alt="Daily Photo">
<h2>Фото дня одного автора</h2>
<img src="https://source.unsplash.com/user/kellysikkema/daily" alt="Daily kellysikkema Photo">
<h2>Фото недели</h2>
<img src="https://source.unsplash.com/weekly" alt="Weekly Photo">
<h2>Фото недели из раздела People</h2>
<img src="https://source.unsplash.com/weekly?people" alt="Weekly People Photo">
<h2>Фото по ключевым словам</h2>
<img src="https://source.unsplash.com/1600x900/?nature,water" alt="Keywords Photo">
<h3>Из assets codepen.io</h3>
<img src='https://images.unsplash.com/photo-1570499968141-2fea1fcdccd3?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ' alt='Feather'>

<div class="bg-unsplash"><h3>Фоновое изображение из assets codepen.io</h3></div>
  
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Montserrat:400,400i,700");
body {
  width: 90%;
  margin: 20px auto;
  font-family: 'Montserrat', sans-serif;
}
img { 
  max-width: 100%;
  display: block;
}
.bg-unsplash{
  margin: 15px 0;
  height: 700px; 
  background-size: cover;
  background-image: url(https://images.unsplash.com/photo-1478217655296-6ca53ca4b677?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=400&fit=max&ixid=eyJhcHBfaWQiOjE0NTg5fQ);
  text-align: center;
  padding: 10%;
}
.bg-unsplash h3 {
  font-size: 3em;
  text-shadow: 2px 2px 4px rgba(0,0,0,.6);
}
@media (max-width: 480px){
  .bg-unsplash {height: 300px}
  .bg-unsplash h3 {font-size: 1.5em;}
}
              
            
!

JS

              
                
              
            
!
999px

Console