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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Image transformation</title>
  </head>
  <body>
    <header>
      <img srcset="https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=400&h=200&fit=crop 400w,
                   https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=600&h=250&fit=crop 600w,
                   https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=800&h=300&fit=crop 800w,
                   https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=1000&h=300&fit=crop 1000w,
                   https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=1200&h=350&fit=crop 1200w"
           sizes="(max-width: 400px) 360px,
                  (max-width: 600px) 560px,
                  (max-width: 800px) 760px,
                  (max-width: 1000px) 960px,
                  1200px
                  "
           src="https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg" alt="Mountains">
    </header>
    <main>
      <section>
        <h1>Adjustable images</h1>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris eget venenatis ligula. Ut lacinia at dolor vitae pulvinar. Aliquam pretium dignissim eros. Integer faucibus, dui non aliquet bibendum, lectus orci lobortis odio, ornare porttitor est tellus eget velit. Nulla eros elit, malesuada id neque vel, viverra vehicula neque. Nullam auctor turpis non leo iaculis finibus. Quisque blandit arcu venenatis libero tempor, ac pulvinar ligula dapibus.</p>
        
        <img srcset="https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/5ad0a62a-1e5c-4cff-aa1b-fdc016efceee/adventure.jpg?w=600&dpr=1,
             https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/5ad0a62a-1e5c-4cff-aa1b-fdc016efceee/adventure.jpg?w=800&dpr=2 2x,
             https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/5ad0a62a-1e5c-4cff-aa1b-fdc016efceee/adventure.jpg?w=1200&dpr=3 3x"
             src="https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/5ad0a62a-1e5c-4cff-aa1b-fdc016efceee/adventure.jpg" alt="Daylight"> 
        
        <p>Suspendisse potenti. Ut in luctus eros. Mauris pulvinar vehicula aliquet. Etiam imperdiet eleifend luctus. Duis ut justo nec eros ornare consectetur. Vestibulum convallis condimentum varius. Maecenas rutrum porta varius. Phasellus volutpat sem id sagittis luctus. Morbi vitae quam vitae nisi iaculis dignissim.</p>    
        
        <p>See the <a href="https://developer.kenticocloud.com/reference#image-transformation">API reference</a> on Image transformation in Kentico Cloud.</p>
      </section>
    </main>
  </body>
</html>
            
          
!

CSS

            
              html {
  font-family: sans-serif;
  background-color: gray;
}
body {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background-color: white;
}

section {
  padding: 20px;
}
p {
  line-height: 1.5;
}
img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
            
          
!

JS

            
              
            
          
!
999px

Console