Codepen-ception
How do I make an codepen-ception?
Recreating the arrow moving effect at the top-right of codepen (when logged in).Works cross-browser.Working on adding the dropdown menu.. What is a codepen-ception? How do you make a codepen-ception? This script and codes were developed by Douglas Glover on 17 October 2022, Monday.
Codepen-ception - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Codepen-ception</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="top-container"> <div class="avatar-container"> <div class="arrow"><img src="https://s.cdpn.io/37045/arrow.png" alt="" /></div> <img src="https://s.cdpn.io/37045/wedding-1.jpg" alt="Avatar" /> <ul class="dropdown hidden"> <li><a href="#">Brand New Pen</a></li> <li class="seperator"></li> <li><a href="#">Your Profile</a></li> <li><a href="#">Your Settings</a></li> <li><a href="#">Recent Activity</a></li> <li class="seperator"></li> <li><a href="#">Keyboard Shortcuts</a></li> <li><a href="#">Help</a></li> <li class="seperator"></li> <li><a href="#">Log Out</a></li> </ul> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Codepen-ception - Script Codes CSS Codes
body{ margin: 0; padding: 0; background: #292A2B; font-family:"HelveticaNeue-CondensedBold", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", Sans-Serif; font-size: .8em;
}
a{ text-decoration: none;
}
.hidden{ display: none;
}
.seperator{ border-bottom: 1px solid #666; margin: 5px 0;
}
.top-container{ height: 70px; background: #212121; border-bottom: 1px solid #3D3D3D;
}
.avatar-container{ position: relative; float: right; height: 40px; width: 60px; padding: 15px 10px; border-bottom: 1px solid #000; background: rgb(60,60,61); /* Old browsers */
background: -moz-linear-gradient(top, rgba(60,60,61,1) 0%, rgba(42,42,42,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(60,60,61,1)), color-stop(100%,rgba(42,42,42,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(60,60,61,1) 0%,rgba(42,42,42,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(60,60,61,1) 0%,rgba(42,42,42,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(60,60,61,1) 0%,rgba(42,42,42,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(60,60,61,1) 0%,rgba(42,42,42,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3c3c3d', endColorstr='#2a2a2a',GradientType=0 ); /* IE6-9 */
}
.avatar-container>img{ width: 40px; position: relative; float: left; display: block; border-radius: 5px; margin: auto; cursor: pointer; z-index: 1;
}
.avatar-container:hover{ background: #000;
}
.avatar-container:hover .arrow{ top: 40px; left: 25px; transform: rotate(180deg); -webkit-transform: rotate(180deg);
}
.arrow{ position: relative; float: left; top: 8px; left: -5px; width: 15px; z-index: 200; transition: top .2s, left .2s, transform .2s; -webkit-transition: top .2s, left .2s, -webkit-transform .2s; -webkit-backface-visibility: hidden;
}
.arrow img{ width: 10px; cursor: pointer;
}
li{ list-style-type: none;
}
.dropdown{ position:absolute; right: 0; top: 50px; width: 200px; color: #fff; padding: 7px 0; box-shadow: 0 5px 10px #000; border-top: 1px solid #3D3D3D; background: rgb(50,50,50); /* Old browsers */
background: -moz-linear-gradient(top, rgba(50,50,50,1) 0%, rgba(0,0,0,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(50,50,50,1)), color-stop(100%,rgba(0,0,0,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(50,50,50,1) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(50,50,50,1) 0%,rgba(0,0,0,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(50,50,50,1) 0%,rgba(0,0,0,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(50,50,50,1) 0%,rgba(0,0,0,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#323232', endColorstr='#000000',GradientType=0 ); /* IE6-9 */
}
.dropdown li a { display: block; padding: 5px 10px 3px; color: #ccc; text-shadow: none;
}
.dropdown li:hover { background: #336fce;
}
Codepen-ception - Script Codes JS Codes
// Dropdown Menu Hover
$(".avatar-container").hover( function () { $(".dropdown").removeClass('hidden'); }, function () { $(".dropdown").addClass('hidden'); }
);
Developer | Douglas Glover |
Username | DouglasGlover |
Uploaded | October 17, 2022 |
Rating | 3 |
Size | 2,847 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
VROptimal 360 Video Demo | 1,559 Kb |
CSS Search Button | 1,756 Kb |
Pulsating Orb | 1,556 Kb |
Triangle Banner | 1,779 Kb |
Loading Dots CSS3 Animation | 1,671 Kb |
Soul Sacrifice DELTA Enemy Weaknesses | 3,973 Kb |
Photo Grid with Hover | 2,667 Kb |
Relative Position SVG Clip-path | 2,526 Kb |
Scrolling Video | 2,252 Kb |
Random Animation | 2,026 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Custom Select Element | Agrayson | 3,616 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
SCSS Social Icons Flat | Mattsince87 | 3,482 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
Weird glowy CSS3 game | Toneworm | 3,684 Kb |
Intake Form Page 2 | Ijantje | 4,983 Kb |
Tree growth tests | Orchard | 3,818 Kb |
Basic HTML Slideshow | Tomhodgins | 3,386 Kb |
Swiftype Lower Third | Zumwalt | 4,796 Kb |
CSS 3D Radio buttons | Andreasnylin | 1,650 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!