css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!-- Example to see the hover efect -->
<a href="#">Hover me, I'm not an UFO</a>

<!-- Cursor -->
<!-- 1. Main -->
<div class="mouse cursor"></div>
<!-- 2. Followers -->
<div class="mouse follow-cursor first"></div>
<div class="mouse follow-cursor second"></div>
<div class="mouse follow-cursor third"></div>
<div class="mouse follow-cursor fourth"></div>
<div class="mouse follow-cursor fifth"></div>
            
          
!
            
              /* - - - - - - - - - - - - - - - - - - - - - -
General styles
- - - - - - - - - - - - - - - - - - - - - - */
html,
body {
	position: relative;
	height: 100%;
	width: 100%;
	margin: 0;
	background: #000010;
	cursor: none !important; /* hide the default cursor   */
}
a {
	position: absolute;
	right: 300px;
	bottom: 300px;
	font-family: Helvetica, Arial, sans-serif;
	font-weight: bold;
	font-size: 32px;
	color: #fff;
}
a:hover {
	text-decoration: none;
}


/* - - - - - - - - - - - - - - - - - - - - - -
Cursor and followers
- - - - - - - - - - - - - - - - - - - - - - */

/* Styles for the main cursor and the followers */
.mouse {
	position: absolute;
	left: 50%;
	width: 50%;
	pointer-events: none;
	background-color: #FF004C;
	border-radius: 100%;
	opacity: 0;
	z-index: 9999;
}

/* Styles for the main cursor */
.cursor {
	width: 30px;
	height: 30px;
	-webkit-transform: translate(-15px,-15px);
					transform: translate(-15px,-15px);
	filter: blur(22px);
}
.cursor.hover {
	width: 4px;
	height: 4px;
	-webkit-transform: translate(-2px,-2px);
					transform: translate(-2px,-2px);
	filter: blur(0px);
}

/* Styles for the followers */
.follow-cursor.first {
	width: 8px;
	height: 8px;
	-webkit-transform: translate(-4px,-4px);
					transform: translate(-4px,-4px);
	filter: blur(6px);
	-webkit-transition: .15s linear;
					transition: .15s linear;
}
.follow-cursor.second {
	width: 20px;
	height: 20px;
	-webkit-transform: translate(-10px,-10px);
					transform: translate(-10px,-10px);
	filter: blur(10px);
	-webkit-transition: .25s linear;
					transition: .25s linear;
}
.follow-cursor.third {
	width: 30px;
	height: 30px;
	-webkit-transform: translate(-15px,-15px);
					transform: translate(-15px,-15px);
	filter: blur(15px);
	-webkit-transition: .55s linear;
					transition: .55s linear;
}
.follow-cursor.fourth {
	width: 4px;
	height: 4px;
	-webkit-transform: translate(-2px,-2px);
					transform: translate(-2px,-2px);
	filter: blur(4px);
	-webkit-transition: .75s linear;
					transition: .75s linear;
}
.follow-cursor.fifth {
	width: 3px;
	height: 3px;
	-webkit-transform: translate(-1.5px,-1.5px);
					transform: translate(-1.5px,-1.5px);
	filter: blur(1px);
	-webkit-transition: 1s linear;
					transition: 1s linear;
}
.follow-cursor.hover {
	width: 72px;
	height: 72px;
	-webkit-transform: translate(-36px,-36px);
					transform: translate(-36px,-36px);
	filter: blur(0px);
	background: transparent;
	border: 1px solid #FF004C;
	border-radius: 0;
}
.follow-cursor.hover.second {
	-webkit-transform: translate(-36px,-36px) rotate(72deg);
					transform: translate(-36px,-36px) rotate(72deg);
}
.follow-cursor.hover.third {
	-webkit-transform: translate(-36px,-36px) rotate(288deg);
					transform: translate(-36px,-36px) rotate(288deg);
}
.follow-cursor.hover.fourth {
	-webkit-transform: translate(-36px,-36px) rotate(144deg);
					transform: translate(-36px,-36px) rotate(144deg);
}
.follow-cursor.hover.fifth {
	-webkit-transform: translate(-36px,-36px) rotate(216deg);
					transform: translate(-36px,-36px) rotate(216deg);
}
            
          
!
            
              // JavaScript is for cowards! but we are afraid tonight…
// We <3 css3 (and JavaScript too) 

// Cursor
$("body").mousemove(function(e){
	var mouse = $(".mouse");
	// Add the mouse position to new cursor and followers
	mouse.css({
		left: e.pageX,
		top: e.pageY,
		opacity: 1, // show the cursor only when move mouse
	});
});

// Hover
$("a").hover(function(){
	// Add class to cursor and followers on hover
	$(".mouse").toggleClass("hover");
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console