Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                
<div class="popout">
	<div class="circle">
		<img aria-hidden="true" src="http://placeimg.com/600/600/nature" />	
		
	</div>
	<div class="person">
		<img alt="Jane Doe" src="https://portal2web.biz/temp/woman1-cropped.png" />	
		<div class="desc">Jane Doe<br />CEO<br />Ext. 100</div>	
	</div>	
	
	
</div>

<div class="popout">
	<div class="circle">
		<img aria-hidden="true" src="http://placeimg.com/600/601/nature" />	
		
	</div>
	<div class="person">
		<img alt="Sally Doe" src="https://portal2web.biz/temp/woman2-cropped.png" />	
		<div class="desc">Sally Doe<br />CFO<br />Ext. 101</div>		
	</div>		
	
</div>

<div class="popout">
	<div class="circle">
		<img aria-hidden="true" src="http://placeimg.com/600/602/nature" />	
		
	</div>
	<div class="person">
		<img alt="Mary Doe" src="https://portal2web.biz/temp/woman3-cropped.png" />	
		<div class="desc">Mary Doe<br />COO<br />Ext. 102</div>		
	</div>		
	
</div>
              
            
!

CSS

              
                
/* Inspired by: https://css-tricks.com/lets-create-an-image-pop-out-effect-with-svg-clip-path/
Note: No techniques from the above article were used. I just thought of a different way to achieve the same idea.

background pattern modified by one presented at: https://projects.verou.me/css3patterns/
*/


* {
	box-sizing: border-box;
}

body {
	display: flex;
	justify-content: center;
	background-color: SteelBlue;
	
	
	background-color: #77cfe5;
	background:
	    radial-gradient(#0074c8 3px, transparent 4px),
	    radial-gradient(#0074c8 3px, transparent 4px),
	    linear-gradient(#77cfe5 4px, transparent 0),
	    linear-gradient(45deg, transparent 74px, transparent 75px, #0074c8 75px, #0074c8 76px, transparent 77px, transparent 109px),
	    linear-gradient(-45deg, transparent 75px, transparent 76px,#0074c8 76px, #0074c8 77px, transparent 78px, transparent 109px),
	   #77cfe5;
	    background-size: 109px 109px, 109px 109px,100% 6px, 109px 109px, 109px 109px;
	    background-position: 54px 55px, 0px 0px, 0px 0px, 0px 0px, 0px 0px;	

	
}

div.popout {
	position: relative;
	float: left;
	width: 20vw;
	height: 20vw;
	display: flex;
	justify-content: center;
		
	&:hover .circle,
	&:hover .person {
		transform: scale(1.1);
	}
	
	&:hover .person > img {
		transform: translate(-50%, -.75vw);	
		
	}
	
	&:hover .person > .desc {
		bottom: -8vw;
		background-color: rgba(0,0,0,.375);
		
	}	
	
	
	& .circle,
	& .person,
	& .person > img {
		transition: transform ease 0.2s;		
		
	}
	
	& .person > .desc {
		transition: bottom ease 0.2s, background-color ease-in-out 0.5s;		
		
	}	
	
	& .circle,
	& .person {
		position: absolute;
		overflow: hidden;
		bottom: 15%;
		width: 12vw;
		transform-origin: 50% 100%;
		
	}//& .circle, & .person
	
	& .circle {
		height: 12vw;
		border-radius: 6vw;
		
		//faux border
		box-shadow: 
			0px 0px 0px 8px Maroon,
			0px 10px 10px 5px rgba(0,0,0,.5);
			
	}//& .circle
	
	& .person {
		border-bottom-left-radius: 6vw 6vw;		
		border-bottom-right-radius: 6vw 6vw;
		height: 16vw;		
	
		& > img {
			transform-origin: 50% 100%;
			width: 18vw;
			height: auto;
			

			//center images horizontally
			margin-left: 50%;
			transform: translate(-50%, 0.75vw);			
			
		}
		
		& .desc {
			position: absolute;
			height: 3vw;
			bottom: -14vw;
			width: 100%; 
			height: 12vw;
			text-align: center;
			
			padding: 1em;
			background-color: transparent;
			background-color: maroon;
			
			font-size: 0.75vw;
			font-family: arial, sans-serif;
			color: ivory;
			
			&:first-line {
				font-weight: bold;
				text-transform: uppercase;
				
			}
			
		}//& .desc
			
	}//& .person
	
}//div.popout
              
            
!

JS

              
                



              
            
!
999px

Console