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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <div class="main">
  <h1>Background Gradient</h1>
  <nav class="block full">
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">Salad</a></li>
      <li><a href="#">Tomatoes</a></li>
      <li><a href="#">Drinks</a></li>
      <li><a href="#">Contact</a></li>
    </ul>
  </nav>
  <div class="flex">
    <div class="block w2-3 top-1">
      <h2>Waiting for content</h2>
<img src="https://www.creativejuiz.fr/temp/imagehost/Pepes-Pizza-Fresh-Tomato.jpg" width="600" height="414">
    </div>
    <div class="w1-3 flex-v">
      <div class="block top-2">
      <h2>Search</h2>
      <form action="">
        <label for="search">What are you looking for?</label>
        <span class="flex">
          <input type="search" placeholder="e.i. Cupcake" id="search">
          <input type="submit" value="ok" />
        </span>
      </form>
        </div>
      <div class="block with-image"> 
        <img src="https://www.creativejuiz.fr/temp/imagehost/chicken-menu.jpg" width="300" height="140">
        
        <h2>Lem' Chicken</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit?</p>
        <p><a href="#" class="btn">The recipe</a></p>
      </div>
    </div>
  </div>
</div>
<p class="origin">Background demo for this <a href="https://www.creativejuiz.fr/blog/tutoriels/creer-de-beaux-degrades-en-css">blog post (fr)</a>.</p>
            
          
!
            
              /* The gradient part */
html {
			background:
				radial-gradient(300px circle at 73% 60%, rgba(69,28,84,.8),rgba(69,28,84,0)),
				radial-gradient(280px circle at 52% 70%, rgba(220,123,67,.95),rgba(220,123,67,0)),
				radial-gradient(421px circle at 82% 82%, rgba(197,197,145,.95),rgba(197,197,145,0)),
				radial-gradient(450px circle at 42% 65%, rgba(192,40,89,1),rgba(192,40,89,0)),
				radial-gradient(480px circle at 40% 75%, rgba(192,40,89,1),rgba(192,40,89,0)),
				radial-gradient(480px circle at 38% 95%, rgba(192,40,89,1),rgba(192,40,89,0)),
				radial-gradient(435px circle at 65% 73%, rgba(235,188,143, 1), rgba(235,188,143, 0)),
				radial-gradient(850px circle at right top, rgba(147,17,87, 1), rgba(147,17,87, .9), rgba(209,64,97,.4), rgba(209,64,97,0)),
				radial-gradient(422px circle at right 75%, rgba(35,173,149, .95), rgba(35,173,149, 0)),
				radial-gradient(350px circle at right 50%, rgba(204,116,96,1), rgba(204,116,96,0)),
				radial-gradient(300px circle at right bottom, rgba(169,82,160, 1),  rgba(169,82,160, 0)),
				linear-gradient(to right bottom, rgba(71,17,77, 0), rgba(71,17,77, 0.95) 40%, rgba(71,17,77, 0.5) 60%, rgba(71,17,77, 0)),
				linear-gradient(to right, #1c062d, #b8205d);
		}

/* Some styles */
* {
	box-sizing: border-box;
}
body {
  min-height: 100vh;
  font-family: "Segoe UI", "Segoe WP", "Open Sans", Helvetica, Arial;
  font-size: 16px;
  line-height: 1.6;
  background: transparent;
}
.main {
  width: 1110px;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
}
.block {
  flex: 1 1 auto;
  padding: 11px 25px 20px;
  margin: 10px;
  background: #FFF;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
  color: #989987;
  border-top: 4px solid #FFF;
  overflow: hidden;
}
.block + .block {
  margin-top: 18px;
}
.block.with-image {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  border-top: 0;
}
.with-image img:first-child {
  display: block;
  border-radius: 4px 4px 0 0;
  width: 100%;
  height: auto;
}
.with-image h2,
.with-image p {
  padding: 0 25px;
}
.top-1 {
  border-top-color: #84656D;
}
.top-2 {
  border-top-color: #CF534E;
}
.flex {
  display: flex;
}
.flex-v {
  display: flex;
  flex-direction: column;
}
.flex .block {
  min-width: 0;
  min-height: 0;
}
.w2-3 {
  flex-basis: 66.666%;
  width: 66.666%;
}
.w1-3 {
  flex-basis: 33.333%;
  width: 33.333%;
  flex-grow: 0;
}
h1 {
  margin: .8em 0 1.65em 0;
  color: #FFF;
  text-align: center;
}
h2 {
  margin-top: .3em;
  margin-bottom: .2em;
}
label {
  display: block;
  margin-bottom: 0.3em;
}
input[type="search"] {
  padding: 5px 10px;
  border: 2px solid #E2E4E6;
  border-right: 0;
  border-radius: 3px 0 0 3px;
  font-size: 1em;
}
input[type="submit"] {
  border: 0;
  background: #989987;
  color: #FFF;
  border-radius: 0 3px 3px 0;
  font-weight: bold;
  font-size: 0.875em;
  text-transform: uppercase;
}
nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
}
li {
  flex: 1 1 auto;
  text-align: center;
}
nav a {
  display: block;
  padding: 20px 5px;
  text-decoration: none;
  color: inherit;
  border-radius: 5px;
}
nav a:hover, nav a:focus {
  background: #989987;
  color: #FFF;
}
a, input {
  transition: all .275s;
}
img {
  max-width: 100%;
  height: auto;
}
.btn {
  display: inline-block;
  margin-top: .5em;
  padding: 8px 20px;
  color: #FFF;
  background: linear-gradient(to right, #551346,#862052);
  text-decoration: none;
  font-size: 0.75em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
}
.origin {
  margin: 1.5em 1em 4em;
  text-align: center;
  color: #FFF;
  font-weight: bold;
}
.origin a {
  color: #FFF;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console