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="notification">
	<input type="checkbox" name="btn" id="btn">
	<label for="btn">
		<span class="counter">1</span>
	</label>
	<div class="panel">
		<ul>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
		</ul>
	</div>
</div>
              
            
!

CSS

              
                :root {
	--off: #3e537e;
	--on: #ffffff;
	--dark: #324671;
	--cl: var(--off);
}

body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 100%, #1d2232, #000);
}

.notification {
	width: 50vmin;
	height: 50vmin;
	display: flex;
	align-items: center;
	justify-content: center;
}

label {
	width: 10vmin;
	height: 10vmin;
	background: #00800000;
	position: relative;
	cursor: pointer;
	transform: scale(0.6);
	transition: all 0.5s ease 0s;
	animation: bell-bounce-down 0.5s ease-in-out 0s;
	animation-fill-mode: forwards;
	--cl: var(--dark);
	filter: drop-shadow(2vmin 2vmin 1vmin #0008);
}

#btn:checked + label {
	animation: bell-bounce-up 0.5s ease-in-out 0s;
	animation-fill-mode: forwards;
}

@keyframes bell-bounce-up {
	0% { margin-top: 0; }
	30% { margin-top: -33vmin; }
	60% { margin-top: -31vmin; }
	100% { margin-top: -35vmin; }
}

@keyframes bell-bounce-down {
	0%, 20% { margin-top: -35vmin; }
	50% { margin-top: -3vmin; }
	80% { margin-top: -4vmin; }
	100% { margin-top: 0vmin; }
}

label:before {
	content: "";
	position: absolute;
	width: 10vmin;
	height: 10vmin;
	left: 0;
	background: 
		conic-gradient(from 125deg at 50% 50%, var(--cl) 0 109deg, #fff0 0 100%), 
		linear-gradient(90deg, #fff0 0 calc(1vmin - 0px), var(--cl) 1vmin calc(100% - 1vmin), #fff0 calc((100% - 1vmin) + 1px) 100%);
	border-radius: 50% 50% 50% 50% / 100% 100% 10% 10%;
	animation: bell-move 1s ease-out 1s 1, bell-color 1s linear 1s 1;	
	animation-fill-mode: forwards;
	transform-origin: 50% 1vmin; 
}

label:after {
	content: "";
	position: absolute;
	width: 2vmin;
	height: 12.85vmin;
	left: 4vmin;
	top: -1vmin;
	background: 
		radial-gradient(circle at 50% 100%, var(--cl) 0 1.5vmin, #fff0 calc(1.5vmin + 1px) 100%), 
		radial-gradient(circle at 50% 1vmin, #fff0 0 0.4vmin, var(--cl) calc(0.4vmin + 1px) 1vmin, #fff0 calc(1vmin + 1px) 100%);
	border-radius: 5vmin;
	background-repeat: no-repeat;
	background-size: 100% 1.25vmin, 100% 100%;
	background-position: 0 100%, 0 0;
	z-index: -1;
	animation: bell-move 1s ease-out 1.2s 1 reverse, bell-color 1s linear 1s 1;	
	animation-fill-mode: forwards;
	transform-origin: 50% 1vmin; 
}

@keyframes bell-move {
	0%, 100% { transform: rotate(0deg); }
	20%, 60% { transform: rotate(10deg); }
	40%, 80% { transform: rotate(-10deg); }
}

@keyframes bell-color {
	0%, 100% { --cl: var(--on); }
}

#btn:checked + label:before,
#btn:checked + label:after {
	animation: none;
	--cl: var(--on);
}

label:hover:before,
label:hover:after,
#btn:checked + label:hover:before,
#btn:checked + label:hover:after {
	--cl: var(--off) !important;
}


.counter {
	background: #ff2323;
	color: #fff;
	width: 6vmin;
	height: 6vmin;
	position: absolute;
	border-radius: 100%;
	font-size: 3.75vmin;
	display: flex;
	align-items: center;
	justify-content: center;
	right: -2vmin;
	font-family: Arial, Helvetica, serif;
	border: 0.65vmin solid #10131c;
	box-sizing: border-box;
	animation: counter-ball 1s ease-out 1s 1;
	animation-fill-mode: forwards;
	opacity: 0;
}

@keyframes counter-ball {
	0% { transform: scale(0); }
	40%, 80%, 100% { transform: scale(1); } 
	20%, 60% { transform: scale(1.25); }
	0%, 11% { opacity: 0; }
	12%, 100% { opacity: 1; }
}

#btn:checked + label .counter {
	animation: hide-counter-ball 0.25s ease 0s;
	animation-fill-mode: forwards;
}

@keyframes hide-counter-ball {
	0% { transform: scale(1); opacity: 1; }
	100% { transform: scale(0); opacity: 0; } 
}

.panel {
	position: absolute;
	border-radius: 0.5vmin;
	width: 35vmin;
	height: 35vmin;
	margin-top: 15vmin;
	padding-top: 2vmin;
	max-height: 0;
	max-width: 0;
	overflow: hidden;
	transition: all 0.5s ease 0s;
	filter: drop-shadow(2vmin 2vmin 1vmin #0008);
}

input#btn {
	position: absolute;
	z-index: -3;
	opacity: 0;
}

.panel ul:before {
	content: "";
	position: absolute;
	border: 2vmin solid #fff0;
	border-bottom-color: var(--off);
	left: calc(50% - 2vmin);
	top: calc(0vmin + 2px);
	transition: all 0.5s ease 0s;
}

#btn:checked + label + .panel {
	max-height: 32.5vmin;
	max-width: 35vmin;
	margin-top: 10vmin;
}

#btn:checked + label + .panel ul:before {
	top: calc(-2vmin + 2px);
}

.panel ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	background: var(--off);
	border-radius: 0.5vmin;
}

.panel ul li {
	width: 100%;
	height: 8vmin;
	border-bottom: 1px solid var(--dark);
}

.panel ul li:last-child {
	border-bottom: 0;
}

.panel ul li:before {
	content: ".";
	width: 25%;
	height: 100%;
	float: left;
	content: "\2022";
	font-size: 10vmin;
	line-height: 8vmin;
	text-align: center;
	color: var(--dark);
}

.panel ul li:after {
	content: "";
	width: 65%;
	height: 1.25vmin;
	float: left;
	text-align: center;
	background: var(--dark);
	border-radius: 1vmin;
	margin-top: 3.35vmin;
}

.panel ul li:nth-child(1):before {
	color: var(--dark);
}

#btn:checked + label + .panel ul li:nth-child(1):before {
	color: #fff;
}

.panel ul li:nth-child(1):after {
	background: var(--dark);
	width: 55%
}

#btn:checked + label + .panel ul li:nth-child(1):after {
	background: #fff;
}

.panel ul li:nth-child(3):after {
	width: 45%
}

.panel ul li:nth-child(4):after {
	width: 60%
}
              
            
!

JS

              
                
              
            
!
999px

Console