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>Doctor Who Actors</h1>
<div class="container">
	<div class="item one"><div class="name"><strong>William Hartnell</strong> <br />1963 / 1966 </div></div>
  <div class="item two"><div class="name"><strong>Patrick Troughton</strong> <br />1966 / 1969 </div></div>
  <div class="item three"><div class="name"><strong>Jon Pertwee </strong><br />1970 / 1974 </div></div>
  <div class="item four"><div class="name"><strong>Tom Baker</strong> <br />1974 / 1981</div></div>
  <div class="item five"><div class="name"><strong>Peter Davison</strong> <br />1981 / 1984</div></div>
  <div class="item six"><div class="name"><strong>Colin Baker </strong><br />1984 / 1986 </div></div>
  <div class="item seven"><div class="name"><strong>Sylvester McCoy </strong><br />1987 / 1996 </div></div>
  <div class="item eight"><div class="name"><strong>Paul McGann </strong><br />1996 </div></div>
  <div class="item wd"><div class="name"><strong>John Hurt</strong> <br />2013 </div></div>
  <div class="item nine"><div class="name"><strong>Christopher Eccleston </strong><br />2005 </div></div>
  <div class="item ten"><div class="name"><strong>David Tennant </strong><br />2005 / 2010 </div></div>
  <div class="item eleven"><div class="name"><strong>Matt Smith </strong><br />2010 / 2013 </div></div>
  <div class="item twelve"><div class="name"><strong>Peter Capldi </strong><br /> 2013 / 2018</div></div>
  <div class="item thirteen"><div class="name"><strong>Jodie Whittaker</strong> <br />2018 / ∞ </div></div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto:300);

body {
  background-color: #f0f0f0;
   background-size: cover;
  margin:0;
	font-family: "Roboto", sans-serif;
}

p {
  color: #666;
}

h1 {
	text-align: center;
	font-weight: lighter;
}

.container{
 display: flex;
 display: -webkit-flex;
 flex-flow: wrap;
 -webkit-flex-flow: wrap;
 align-items: center;
 -webkit-align-items: center;
	width: 60%;
	margin: 1% auto;
}

.item {
  background-color: #fff;
  height: 150px;
  width: 100px;
  justify-content: center;
  flex: 1 1 auto;
  margin: 10px;
  padding: 30px;
  text-align: center;
  transition: 0.5s;
  background-size: 200% auto;
  border-radius: 5px;
  order: 1;
	position: relative;
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}

.name {
	background-color: #fff;
	position: absolute;
	bottom: 0;
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
	width: 100%;
	margin-left: -30px;
	padding: 5px 0;
}

.one {
  background: url(http://whobackwhen.com/wp-content/uploads/WhoBackWhen-Doctor-Who-DoctorWho-DrWho-First-Doctor-1st-William-Hartnell.jpg) no-repeat center;
  background-size: cover;
}

.one:hover {
  background: url(http://www.doctorwhotv.co.uk/wp-content/uploads/Susan-Foreman-Carole-Ann-Ford.jpg) no-repeat center;
  background-size: cover;
}

.two {
  background: url(http://vignette3.wikia.nocookie.net/tardis/images/e/ea/SecondAndRecorder.jpg/revision/latest?cb=20101031134628) no-repeat center;
  background-size: cover;
}

.three {
  background: url(https://www.peter-capaldi-news.com/wp-content/uploads/2015/06/JohnPertwee.jpg) no-repeat center;
  background-size: cover;
}

.four {
  background: url(http://images4.fanpop.com/image/photos/22400000/The-Fourth-Doctor-the-fourth-doctor-22491658-800-600.png) no-repeat center;
  background-size: cover;
}

.four:hover {
  background: url(http://www.doctorwhotv.co.uk/wp-content/uploads/sarah-jane-sladen-wedding-570x380.jpg) no-repeat center;
  background-size: cover;
}

.five {
  background: url(http://www.cultbox.co.uk/wp-content/uploads/2014/06/Doctor-Who-Peter-Davison-Fifth-Doctor.jpg) no-repeat center;
  background-size: cover;
}

.six {
  background: url(https://upload.wikimedia.org/wikipedia/en/4/4b/Sixth_Doctor_%28Doctor_Who%29.jpg) no-repeat center;
  background-size: cover;
}

.seven {
  background: url(https://1.bp.blogspot.com/-uDpmdMb_5Ug/TdDUb0MHltI/AAAAAAAAC4U/SMnoM2dAVyE/s1600/sylvester_mccoy.jpg) no-repeat center;
  background-size: cover;
}

.eight {
  background: url(http://nerdist.com/wp-content/uploads/2015/07/Eighth-Doctor-Comics-Featured-071315.jpg) no-repeat center;
  background-size: cover;
}


.wd {
  background: url(https://i.ytimg.com/vi/FxdzcRQ45Fc/maxresdefault.jpg) no-repeat 80%;
  background-size: cover;
}

.nine {
  background: url(http://i4.mirror.co.uk/incoming/article143016.ece/ALTERNATES/s615/Christopher-Eccleston-as-Doctor-Who-2011.jpg) no-repeat center;
  background-size: cover;
}

.nine:hover {
	background: url(https://vignette.wikia.nocookie.net/tardis/images/b/b7/The_Moment.jpg/revision/latest?cb=20131125192641) no-repeat center;
background-size: cover;
}

.ten {
  background: url(https://subscriptions.acecomics.co.uk/wp-content/uploads/2017/11/doctor-who-10-year-three.jpg) no-repeat center; 
  background-size: cover;
}

.ten:hover {
  background: url(https://thumbs.gfycat.com/RegalEvergreenDove-size_restricted.gif) no-repeat center; 
  background-size: cover;
}

.eleven {
  background: url(http://i.huffpost.com/gen/1168733/images/h-MATT-SMITH-LEAVING-DOCTOR-WHO-628x314.jpg) no-repeat center;
  background-size: cover;
}

.eleven:hover {
  background: url(https://thecasualnexus.files.wordpress.com/2017/06/clara-timeline.jpg) no-repeat center;
  background-size: cover;
}

.twelve {
  background: url(http://www.giornalettismo.com/wp-content/uploads/2014/01/peter-capaldi-doctor-who-10.jpg) no-repeat center;
  background-size: cover;
}

.thirteen {
  background: url(http://images.amcnetworks.com/bbcamerica.com/wp-content/uploads/2017/07/Thirteenth-Doctor-Monica-1600x720.jpg) no-repeat center;
  background-size: cover;
}
              
            
!

JS

              
                // NO JS
              
            
!
999px

Console