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="webinar-card">
		<div class="header-img">
			<a id="" href="#">
				<i id="playBtn" class="material-icons header-icon icon-play">&#xe039;</i>
			</a>
		</div>
		<div class="webinar-card__content">
			<span class="label">Racing</span>
			<h1>Second Place is Never Enough</h1>
			<p>The eyes of the motorsport world will be on the event more than ever― Formula 1 Driver Fernando Alonso went so far as to skip the Monaco Grand Prix, arguably the biggest race on the F1 calendar, just to drive in the Indianapolis 500.</p>
			<ul class="content-info">
				<li class="info info-icon info-date">Sunday, May 28, 2017</li>
				<li class="info info-icon info-time">11:00AM ET</li>
			</ul>
			<a id="registerBtn" class="btn">Subscribe to <span class="highlight">Watch</span></a>
	</div>
  <div class="space"></div>
</div>

<!-- The Modal -->
<div id="registerModal" class="modal animated fadeIn">

  <!-- Modal content -->
  <div class="modal-content">
    <i class="material-icons close">&#xe5cd;</i>
			<div class="modal-form">
				<h1>Watch Live</h1>
					<form action="#">
						
						<div class="col-half">
							<div class="form-group">
									<label for="email">Email</label>
									<input class="form-control" type="email" name="email" id="email" placeholder="avon@barksdaleorg.com" />
							</div>
						</div>
						
						<div class="col-half">
							<div class="form-group">
									<label for="name">Name</label>
									<input class="form-control" type="text" name="name" id="name" placeholder="Avon Barksdale" />
							</div>
						</div>
						
				</form>
				<a id="registerBtn2" class="btn">
					<span class="hide-small">Watch the Updates <span class="highlight">Live</span></span>
					<span class="hide-large">Watch</span>
				</a>
			</div>
  </div>

</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Muli:400,700,900');


$sans-serif:'Muli';

$font-stack: $sans-serif, helvetica, arial, sans-serif;

$color-shadow:transparetize(#303336, .9);

$primary-color: #845ecc;

$btn-color: #fc648c;

$card-img: url("https://topgearmotorsport.files.wordpress.com/2017/04/2013-indy-500.jpg?w=1360");

$small:600px;
$medium:1000px;
$large: 1400px;

html {
	box-sizing: border-box;
}

*, *:before, *:after {
	box-sizing: inherit;
}

* {
  transition: .3s ease;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: linear-gradient(-45deg, #EEF0F3 0%, #F6F5F3 100%);
	font-family: $font-stack;
}

a{
	text-decoration: none;
}

.webinar-card {
  margin: 10vh auto;
  width: 50%;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(50, 50, 90, .1), 0 5px 15px rgba(0, 0, 0, .07);
  transition: .6s ease;
  background: #ffffff;
  text-align: left;
}

.webinar-card__content {
	padding:.3em 2em;
}

.header-img {
  border-radius: 4px 4px 0 0;
  margin-bottom: 2vh;
	background-image:$card-img;
	display: block;
	height: 150px;
	background-size: cover;
	background-position:30% 90% ;
}

.header-icon {
	color: #ffffff;
	text-align:center;
	display: block;
	margin:auto;
	font-size: 4em;
	line-height:150px;
	width:100%;
	height:150px;
	opacity:.5;
	background-color: rgba(30,31,64,0.5);
}

.header-icon:hover {
	text-shadow: 0px 3px 11px rgba(0, 0, 0, 0.4);
	opacity:1;
}

h1 {
  font-size: 2em;
  color: #28294a;
		font-weight: 900;
  font-family: $font-stack;
		line-height: 1;
}

.label {
  font-size: .6rem;
  color: #ffffff;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: $font-stack;
  font-weight: 700;
		background-color: $primary-color;
		padding:.5em 1em;
		border-radius: 13px;
}

p {
  color: #9e9e9e;
  font-family: $font-stack;
  font-weight: 400;
  font-size: .9rem;
  line-height: 1.4;
}

ul {
	list-style-type:none;
	margin: 0;
 padding: 0;
 overflow: hidden;
	margin-bottom: 1em;
}

.info {
	color: $primary-color;
	font-size: .9em;
 padding-right: 2em;
 text-decoration: none;
	display: inline;
	vertical-align: middle;
}

.info-icon::before {
	font-family: 'Material Icons';
	font-size: 1.2em;
	padding-right: .5em;
	vertical-align:middle;
}

.info-date::before {
	content: "\e916";
}

.info-time::before {
	content: "\e192";
}

.btn,
a.btn {
  display: inline-block;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  line-height: 20px;
  border-radius: 30px;
  padding: .7em 2.5em;
		background: $btn-color;
  color:white;
		font-weight: 700;
		letter-spacing: 2px;
  font-family:$font-stack;
  font-size:.8rem;
  box-shadow:0 0px 0px $color-shadow,
0 0px 0px rgba(0, 0, 0, 0);
	
	& .highlight {
		color: #ffeb3b;
	}
}

.btn,
a.btn:hover {
  background: rgb(255, 53, 104);
  box-shadow:0 7px 14px $color-shadow,
0 3px 6px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.btn,
a.btn:active {
  box-shadow:0 4px 6px $color-shadow,
0 1px 3px rgba(0, 0, 0, .12);
  transform: translateY(1px);
}

a.btn-lg {
	font-size: 1em;
	padding: .8em 3em;
}

.space{
  height:4vh;
}

.hide-large {display:none;}
	.hide-small {display:inline-block;}

.col-half {
	width: 45%;
	padding: .5em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden;
    background-color: rgb(0,0,0); 
    background-color: rgba(30,31,64,0.7);
				animation-duration: .3s;
}

.modal-content {
    background-color: #ffffff;
    margin: 20vh auto;
    border: 1px solid #888;
    width: 50%;
				border-radius: 8px;
				padding: .5em;
}

.modal-form {
				padding: 1.5em;
				text-align:center;
}

.close {
    color: #bdbdbd;
    top: 0;
				float:right;
    font-size: 1.2em;
}

.close:hover,
.close:focus {
    color: #28294a;
    text-decoration: none;
    cursor: pointer;
} 

form {
	display: flex;
	align-items:center;
	flex-flow: row wrap;
}

.form-control {
	width: 100%;
	display: inline-block;
	color: rgba(30,31,64,1);
	border-top: 0;
	border-right:0;
	border-left: 0;
	border-bottom: 1px solid rgba(30,31,64,.3);
	font-size: 1em;
	font-family:'Muli', arial, sans-serif;
	user-select: auto;
}

.form-control:active, .form-control:focus {
	border-bottom:1px solid rgba(30,31,64,1);
	box-shadow: none;
	outline: none;
}

input::placeholder {
	color: rgba(30,31,64,.3);
	opacity: 1;
}



input:invalid {
 border-bottom:1px solid $btn-color;
	border-top: 0;
	border-right:0;
	border-left: 0;
	box-shadow:none;
}

.form-group {
	margin-bottom: 1em;
	text-align: left;
	
	& label {
		font-size: .8em;
		text-transform: uppercase;
		font-weight: 700;
		letter-spacing: .1em;
		color: #bdbdbd;
		margin-bottom:.5em;
		display: inline-block;
	}
}

@media (max-width:$medium){
	.webinar-card {
		width: 75%;
	}
	.header-img,.header-icon {
		height: 200px;
		line-height:200px;
		font-size: 2.5em;
	}
	.col-half {
	width: 100%;
}
	.info {
		display: block;
		font-size: 1.1em;
		padding-right: 0;
	}
	.info:nth-child(1) {
		margin-bottom: 1em;
	}
}

@media (max-width:$small){
	.webinar-card {
		width: 95%;
	}
	.header-img,.header-icon {
		height: 200px;
		line-height:200px;
		font-size: 2.5em;
	}
	.hide-large {display:inline-block;}
	.hide-small {display:none;}
	
	.col-half {
	width: 100%;
}
	
	.modal-content {
		width: 80%;
	}
	
}
              
            
!

JS

              
                var modal = document.getElementById('registerModal');

var btn = document.getElementById("registerBtn");

var btnClose = document.getElementById("registerBtn2");

var playBtn = document.getElementById("playBtn");

var span = document.getElementsByClassName("close")[0];

var modalBtn = document.getElementsByClassName("modalBtn");

btn.onclick = function() {
    modal.style.display = "block";
}

btnClose.onclick = function() {
    modal.style.display = "none";
}

playBtn.onclick = function() {
    modal.style.display = "block";
}

span.onclick = function() {
    modal.style.display = "none";
}

window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
} 


              
            
!
999px

Console