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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

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

              
                
<html>
<head>
  <title>Grids</title>
</head>
<body>
  <container class="container">
    <h1>DEVELOPED__12/23/17__9:16 PM</h1>
    <div class="grid">
      <div class="item">
        <span class="action">Action</span>
        <div class="details">
          Don’t give up what you want most, for what you want now.
        </div>
      </div>
      <div class="item large">
        <span class="romance">Romance</span>
        <div class="details">
          Obstacles do not block the path, they are the path. – Zen Proverb
        </div>
      </div>
      <div class="item medium">
        <span>New</span>
        <div class="details">
          If I love you I won’t give up easily. Leaving is my last option but if you push me away I will walk away
          knowing I gave it my all.
        </div>
      </div>
      <div class="item large">
        <span>New</span>
        <div class="details">
          I would break my own heart to protect yours.
        </div>
      </div>
      <div class="item full">
        <span class="popular">Popular Today</span>
        <div class="details">
          Lorem ipsum dolor sit, amet consectetur adipisicing elit. Dolorem.
        </div>
      </div>
      <div class="item medium">
        <span>New</span>
        <div class="details">
          Success is not to be measured by wealth, fame, or power, but by the distance of a man and what he might be.
        </div>
      </div>
      <div class="item large">
        <span>New</span>
        <div class="details">
          If we change our mind, we change our body, our health, our wealth and our relationships.
        </div>
      </div>
      <div class="item">
        <span>New</span>
        <div class="details">
          Live, feel, and simply try to be yourself.
        </div>
      </div>
      <div class="item medium">
        <span>New</span>
        <div class="details">
          Frame every so-called disaster with these words: ‘In five years will this matter?’ – Regina Brett
        </div>
      </div>
      <div class="item large">
        <span>New</span>
        <div class="details">
          Pain is not to remember, but to dare to examine.
        </div>
      </div>
      <div class="item">
        <span>New</span>
        <div class="details">
          We are all broken, that’s how the light gets in. – Ernest Hemingway
        </div>
      </div>
      <div class="item medium">
        <span>New</span>
        <div class="details">
          You can’t start the next chapter of your life if you keep re-reading the last one.
        </div>
      </div>
      <div class="item medium">
        <span>New</span>
        <div class="details">
          Yesterday I was clever, so I wanted to change the world. Today I am wise, so I am changing myself. – Rumi
        </div>
      </div>
      <div class="item large">
        <span>New</span>
        <div class="details">
          We cannot erase the past, but we can accept it as history. – Gary Chapman
        </div>
      </div>
      <div class="item">
        <span>New</span>
        <div class="details">
          Never suppress a generous thought. – Camilla Kimball
        </div>
      </div>
    </div>
  </container>
</body>
</html>

<!-- FOLLOW -->
<a class="Follow" href="https://codepen.io/ZaynAlaoudi/" target="blank_"></a>


              
            
!

CSS

              
                body{
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	position: relative;
	width: 100%;
	height: 100%;
	background: #f5f4f4;
	font-size: 13px;
	font-weight: 100;
	letter-spacing: 1px;
	font-family: 'Roboto', sans-serif;
}

@supports (display: grid) {
	body,
	html {
		display: block;
	}
}

@supports (display: grid) {
	.message {
		display: none;
	}
}

.container {
	display: none;
	padding: 2rem;
}

@media screen and (min-width: 768px) {
	.container {
		padding: 4rem;
	}
}

@supports (display: grid) {
	.container {
		display: block;
	}
}

h1 {
	color: violet;
	font-size: 2rem;
	margin: 0 0 1.5em;
}

.grid {
	display: grid;
	grid-gap: 30px;
	grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
	grid-auto-rows: 150px;
	grid-auto-flow: row dense;
	line-height: 20px;
	
}
/* Items  */
.item {
	position: relative;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-orient: vertical;
	-webkit-box-direction: normal;
	-ms-flex-direction: column;
	flex-direction: column;
	-webkit-box-pack: end;
	-ms-flex-pack: end;
	justify-content: flex-end;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	background: #0c9a9a;
	color: #fff;
	grid-column-start: auto;
	grid-row-start: auto;
	color: #fff;
	
}
.item{
	background: url("https://source.unsplash.com/900x1100");
	background-size: cover;
	background-position: center;
	-webkit-box-shadow: -2px 2px 10px 0px rgba(68, 68, 68, 0.4);
	box-shadow: -2px 2px 10px 0px rgba(68, 68, 68, 0.4);
	-webkit-transition: -webkit-transform 0.3s ease-in-out;
	transition: -webkit-transform 0.3s ease-in-out;
	transition: transform 0.3s ease-in-out;
	transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
	cursor: pointer;
	counter-increment: item-counter;
	border-bottom: 3px solid rgba(2,204,186,0.8);
}
/* End item */

/* categories || Examples Action, Romance, New, And Popular Today */
span{
	width: 10%;
	margin: 20PX;
	z-index: 10;
	padding: 7px;
	background: -webkit-linear-gradient(to right, #b24592, #f15f79);
  background: linear-gradient(to right, #b24592, #f15f79);
	border-radius: 50px 120px 120px;	
}

.popular{
	width: 100px;
	margin: 20PX;
	z-index: 10;
	padding: 7px;
	background: #9D50BB; 
	background: -webkit-linear-gradient(to right, #6E48AA, #9D50BB);  
	border-radius: 50px 120px 120px;
}
.action{
	width: 16%;
	margin: 20PX;
	z-index: 10;
	padding: 7px;
	background: #50C9C3;  
	background: -webkit-linear-gradient(to right, #96DEDA, #50C9C3);  
	background: linear-gradient(to right, #96DEDA, #50C9C3); 
}
.romance{
	width: 24%;
	margin: 20PX;
	z-index: 10;
	padding: 7px;
	background: #24C6DC; 
	background: -webkit-linear-gradient(to right, #514A9D, #24C6DC);  
	background: linear-gradient(to right, #514A9D, #24C6DC); 

}

.item:nth-of-type(3n) {
	background-image: url("https://source.unsplash.com/500x300");
	
}

.item:nth-of-type(4n) {
	background-image: url("https://source.unsplash.com/800x700");
	
}

.item:nth-of-type(5n) {
	background-image: url("https://source.unsplash.com/5000x6000");
	
}

.item:nth-of-type(6n) {
	background-image: url("https://source.unsplash.com/500x800");
	
}

.item:after {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: black;
	opacity: 0.5;
	-webkit-transition: opacity 0.3s ease-in-out;
	transition: opacity 0.3s ease-in-out;
	
}

.item:hover {
	-webkit-transform: scale(1.05);
	transform: scale(1.05);
}

.item:hover:after {
	opacity: 0;
}

.medium {
	grid-row-end: span 2;
}

.large {
	grid-row-end: span 3;
}

.full {
	grid-column-end: auto;
}

@media screen and (min-width: 768px) {
	.full {
		grid-column: 1/-1;
		grid-row-end: span 2;
	}
}

.details {
	position: relative;
	z-index: 1;
	padding: 15px;
	background: #fff;
	text-transform: lowercase;
	letter-spacing: 1px;
	color: #828282;
}

.details:before {
	font-weight: bold;
	font-size: 1.1rem;
	padding-right: 0.5em;
	color: #444;
}



/*  FOLLOW*/
.Follow {	  background:url("https://pbs.twimg.com/profile_images/959092900708544512/v4Db9QRv_bigger.jpg")no-repeat center / contain;
	width: 50px;
	height: 50px;
	bottom: 9px;
	right: 20px;
	display:block;
	position:fixed;
	border-radius:50%;
	z-index:999;
	animation:  rotation 10s infinite linear;
	}

@-webkit-keyframes rotation {
		from {
				-webkit-transform: rotate(0deg);
		}
		to {
				-webkit-transform: rotate(359deg);
		}
}






              
            
!

JS

              
                
              
            
!
999px

Console