CSS Self Portrait
How do I make an css self portrait?
Created a css self portrait to see what I could do using just css.. What is a css self portrait? How do you make a css self portrait? This script and codes were developed by Mark Thomes on 04 July 2022, Monday.
CSS Self Portrait - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Self Portrait</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='css/7534eb3fb62294822de9eace9.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class='me js-me'> <div class="shirt"> <div class="shirt-sleeve"> <div class="shirt-sleeve-left"></div> <div class="shirt-sleeve-right"></div> </div> <div class="shirt-neck"></div> </div> <div class="neck"></div> <div class='head'> <div class="hair"> <div class="hair-top"></div> <div class="hair-sideburns"></div> </div> <div class='eye'> <div class='eye-left'> <div class='eye-left-brow'></div> <div class='eye-left-ball'></div> </div> <div class='eye-right'> <div class='eye-right-brow'></div> <div class='eye-right-ball'></div> </div> </div> <div class="ear"> <div class="ear-left"></div> <div class="ear-right"></div> </div> <div class="jaw"></div> <div class="beard"> <div class="beard-stash"> <div class="beard-stash-mouth"></div> </div> </div> <div class="nose"></div> <div class="mouth"> <div class="mouth-teeth"></div> <div class="mouth-lip"></div> </div> </div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="display:none"> <defs> <filter id="squiggly-0"> <feTurbulence id="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" seed="0"/> <feDisplacementMap id="displacement" in="SourceGraphic" in2="noise" scale="2" /> </filter> <filter id="squiggly-1"> <feTurbulence id="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" seed="30"/>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="3" /> </filter> <filter id="squiggly-2"> <feTurbulence id="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" seed="2"/>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="2" /> </filter> <filter id="squiggly-3"> <feTurbulence id="turbulence" baseFrequency="0.02" numOctaves="3" result="noise" seed="30"/>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="3" /> </filter> <filter id="squiggly-4"> <feTurbulence id="turbulence" baseFrequency="0.1" numOctaves="3" result="noise" seed="4"/>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="1" /> </filter> </defs>
</svg> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/15979/footer-inject.js'></script> <script src="js/index.js"></script>
</body>
</html>
CSS Self Portrait - Script Codes CSS Codes
html { box-sizing: border-box;
}
*, *:before, *:after { box-sizing: inherit;
}
body { background-color: #333333; background: -webkit-linear-gradient(bottom, #262626 0%, #333333 100%); background: linear-gradient(to top, #262626 0%, #333333 100%); height: 100%; margin: 0; background-repeat: no-repeat; background-attachment: fixed;
}
.me { position: absolute; width: 640px; height: 426px; bottom: 0; left: 50%; -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); overflow: hidden;
}
.me.isSquiggle { -webkit-animation: squiggly-anim 0.3s infinite; animation: squiggly-anim 0.3s infinite;
}
.me_refshow:before { opacity: 1;
}
.me_toonshow .head { opacity: 0.5;
}
.me_toonshow .shirt { opacity: 0.25;
}
.head, .ear, .jaw { position: absolute;
}
.shirt { position: absolute; bottom: -20px; left: 106px; width: 400px; height: 158px; background-color: #0161b4; border-radius: 200px 250px 0px 0px / 61px 42px 0px 0px;
}
.shirt-sleeve-left { position: absolute; bottom: 0; left: -43px; width: 80px; height: 148px; background-color: #0161b4; border-radius: 26px 0px 0px 0px / 111px 0px 0px 0px; -webkit-transform: translate(0, 28px) rotate(23deg); transform: translate(0, 28px) rotate(23deg);
}
.shirt-sleeve-right { position: absolute; bottom: 0; right: -49px; width: 80px; height: 148px; background-color: #0161b4; border-radius: 0px 26px 0px 0px / 0px 111px 0px 0px; -webkit-transform: translate(0, 23px) rotate(-23deg); transform: translate(0, 23px) rotate(-23deg);
}
.shirt-neck { position: absolute; top: 0; left: 155px; width: 116px; height: 86px; background-color: #0169c3; border-radius: 52px; border: 2px solid rgba(0, 0, 0, 0.1);
}
.neck { position: absolute; bottom: 67px; left: 269px; width: 100px; height: 80px; background-color: #da9674; border-radius: 44px; border-right: 4px solid #d48760; border-bottom: 4px solid #d48760; border-left: 4px solid #d48760;
}
.head { top: 44px; left: 236px; width: 169px; height: 289px; background-color: #dfa588; border-radius: 84px 84px 84px 84px / 82px 82px 150px 150px; -webkit-transition: opacity 250ms linear; transition: opacity 250ms linear; -webkit-transform-origin: 50% 90%; transform-origin: 50% 90%; -webkit-transform: rotate(0deg); transform: rotate(0deg); -webkit-animation: swayhead 10s cubic-bezier(0.86, 0, 0.07, 1) alternate infinite; animation: swayhead 10s cubic-bezier(0.86, 0, 0.07, 1) alternate infinite;
}
.hair { position: absolute; top: -6px; left: -6px; width: 181px; height: 121px; background-color: #ab775b; border-radius: 84px 84px 8px 8px / 82px 82px 34px 34px; z-index: 1;
}
.hair:after { content: ''; position: absolute; top: 10px; right: 10px; bottom: -1px; left: 10px; background-color: #dfa588; border-radius: 84px 84px 4px 4px / 82px 82px 20px 20px;
}
.hair-top { position: absolute; top: 3px; left: 54px; width: 72px; height: 34px; background-color: #ab775b; border-radius: 30px 30px 30px 30px / 12px 12px 20px 20px; z-index: 1;
}
.hair-sideburns { position: absolute; right: 0; bottom: 0; left: 0; height: 10px; z-index: 1;
}
.hair-sideburns:before, .hair-sideburns:after { content: ''; position: absolute; top: 8px; width: 5px; height: 30px; background-color: #ab775b; border-radius: 3px 3px 3px 3px / 3px 3px 3px 3px;
}
.hair-sideburns:before { left: 7px;
}
.hair-sideburns:after { right: 7px;
}
.jaw { bottom: 14px; left: -3px; background-color: #dfa588; width: 175px; height: 140px; border-radius: 8px 8px 89px 89px / 28px 28px 120px 120px;
}
.beard { position: absolute; top: 141px; left: -7px; background-color: #a36f54; width: 184px; height: 156px; border-radius: 9px 10px 79px 79px / 28px 28px 120px 120px;
}
.beard:before { content: ''; position: absolute; top: -10px; left: 13px; width: 157px; height: 92px; background-color: #dfa588; border-radius: 0px 0px 40px 40px / 0px 0px 70px 70px;
}
.beard-stash { position: absolute; top: 40px; left: 36px; width: 112px; height: 90px; background-color: #a36f54; border-radius: 50px 50px 40px 40px / 20px 20px 80px 80px; z-index: 1;
}
.beard-stash-mouth { position: absolute; top: 11px; left: 13px; width: 86px; height: 73px; background-color: #dfa588; border-radius: 30px 30px 30px 30px / 10px 10px 60px 60px;
}
.beard-stash-mouth:after { content: ''; position: absolute; bottom: -1px; left: 30px; width: 28px; height: 30px; background-color: #a36f54; border-radius: 6px 6px 0px 0px / 30px 30px 0px 0px;
}
.nose { position: absolute; bottom: 111px; left: 67px; width: 38px; height: 15px; background-color: #dfa588; border-bottom: 4px solid #d48760; border-radius: 50%; z-index: 3;
}
.mouth-teeth { position: absolute; bottom: 70px; left: 50px; width: 69px; height: 20px; border-top: 2px solid #e6e6e6; border-bottom: 4px solid #e6e6e6; background-color: white; border-radius: 20px 20px 34px 34px / 3px 3px 17px 17px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.05), 0 -2px 0 rgba(0, 0, 0, 0.05); z-index: 3;
}
.mouth-teeth:after { content: ''; position: absolute; top: 50%; right: 6px; left: 6px; height: 1px; background-color: #e6e6e6; border-radius: 50%;
}
.mouth-lip { position: absolute; bottom: 59px; left: 67px; width: 38px; height: 8px; background-color: #dfa588; border-bottom: 2px solid #d68d68; border-radius: 50%; z-index: 3;
}
.eye { position: absolute; top: 126px; left: 0; right: 0; background-color: red; z-index: 2;
}
.eye-left,
.eye-right { position: absolute; top: 0; width: 10px; background-color: rgba(0, 0, 0, 0.25);
}
.eye-left { left: 42px;
}
.eye-right { right: 42px;
}
.eye-left-ball,
.eye-right-ball { position: absolute; top: 0; width: 10px; height: 14px; background-color: black; border-radius: 5px 5px 5px 5px / 8px 8px 5px 5px; -webkit-animation: look 10s linear infinite alternate; animation: look 10s linear infinite alternate;
}
.eye-left-brow,
.eye-right-brow { position: absolute; top: -16px; width: 29px; height: 6px; background-color: #b4856c; border-radius: 0px 0px 0px 0px / 0px 0px 0px 0px;
}
.eye-left-brow { left: -16px; border-radius: 5px 12px 12px 5px / 3px 3px 3px 3px; -webkit-transform: rotate(-5deg); transform: rotate(-5deg);
}
.eye-right-brow { right: -16px; border-radius: 12px 5px 5px 12px / 3px 3px 3px 3px; -webkit-transform: rotate(5deg); transform: rotate(5deg);
}
.ear { top: 110px; right: 0; left: 0; width: 100%; background-color: red; z-index: 0;
}
.ear > * { position: absolute; top: 0; width: 20px; height: 26px; background-color: #dfa588;
}
.ear-left { top: 0; left: -8px; border-radius: 5px 0px 0px 20px / 5px 0px 0px 14px;
}
.ear-left:after { content: ''; position: absolute; top: 5px; left: 3px; width: 16px; height: 26px; background-color: #dfa588; border-radius: 16px 0px 0px 5px/23px 0px 0px 5px;
}
.ear-right { top: 0; right: -8px; border-radius: 0px 5px 20px 0px / 0px 5px 14px 0px;
}
.ear-right:after { content: ''; position: absolute; top: 5px; width: 16px; height: 26px; background-color: #dfa588; border-radius: 0px 18px 5px 0px / 0px 27px 4px 0px;
}
@-webkit-keyframes look { 0% { -webkit-transform: scale(1, 1) translateX(-3px); transform: scale(1, 1) translateX(-3px); } 49.5% { -webkit-transform: scale(1, 1) translateX(-3px); transform: scale(1, 1) translateX(-3px); } 50% { -webkit-transform: scale(1, 0.1) translateX(0px); transform: scale(1, 0.1) translateX(0px); } 50.5% { -webkit-transform: scale(1, 1) translateX(3px); transform: scale(1, 1) translateX(3px); } 100% { -webkit-transform: scale(1, 1) translateX(3px); transform: scale(1, 1) translateX(3px); }
}
@keyframes look { 0% { -webkit-transform: scale(1, 1) translateX(-3px); transform: scale(1, 1) translateX(-3px); } 49.5% { -webkit-transform: scale(1, 1) translateX(-3px); transform: scale(1, 1) translateX(-3px); } 50% { -webkit-transform: scale(1, 0.1) translateX(0px); transform: scale(1, 0.1) translateX(0px); } 50.5% { -webkit-transform: scale(1, 1) translateX(3px); transform: scale(1, 1) translateX(3px); } 100% { -webkit-transform: scale(1, 1) translateX(3px); transform: scale(1, 1) translateX(3px); }
}
@-webkit-keyframes swayhead { 0% { -webkit-transform: rotate(-3deg); transform: rotate(-3deg); } 45% { -webkit-transform: rotate(-3deg); transform: rotate(-3deg); } 55% { -webkit-transform: rotate(3deg); transform: rotate(3deg); } 100% { -webkit-transform: rotate(3deg); transform: rotate(3deg); }
}
@keyframes swayhead { 0% { -webkit-transform: rotate(-3deg); transform: rotate(-3deg); } 45% { -webkit-transform: rotate(-3deg); transform: rotate(-3deg); } 55% { -webkit-transform: rotate(3deg); transform: rotate(3deg); } 100% { -webkit-transform: rotate(3deg); transform: rotate(3deg); }
}
@-webkit-keyframes squiggly-anim { 0% { -webkit-filter: url("#squiggly-0"); filter: url("#squiggly-0"); } 25% { -webkit-filter: url("#squiggly-1"); filter: url("#squiggly-1"); } 50% { -webkit-filter: url("#squiggly-2"); filter: url("#squiggly-2"); } 75% { -webkit-filter: url("#squiggly-3"); filter: url("#squiggly-3"); } 100% { -webkit-filter: url("#squiggly-4"); filter: url("#squiggly-4"); }
}
@keyframes squiggly-anim { 0% { -webkit-filter: url("#squiggly-0"); filter: url("#squiggly-0"); } 25% { -webkit-filter: url("#squiggly-1"); filter: url("#squiggly-1"); } 50% { -webkit-filter: url("#squiggly-2"); filter: url("#squiggly-2"); } 75% { -webkit-filter: url("#squiggly-3"); filter: url("#squiggly-3"); } 100% { -webkit-filter: url("#squiggly-4"); filter: url("#squiggly-4"); }
}
CSS Self Portrait - Script Codes JS Codes
// Click for Squigglevision
$me = $('.js-me');
$me.on('click', function() { $me.toggleClass('isSquiggle');
});
Developer | Mark Thomes |
Username | WithAnEs |
Uploaded | July 04, 2022 |
Rating | 4 |
Size | 9,872 Kb |
Views | 121,440 |
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 |
Sidebar Nav | 3,808 Kb |
Pharmacy Loader | 3,425 Kb |
Swaying Open Sign | 3,523 Kb |
Twitter Feed Loading Animation | 6,763 Kb |
Social Icons | 8,247 Kb |
404 Animated Character | 8,559 Kb |
SVG Search... | 7,601 Kb |
Save Bar | 2,719 Kb |
Aperture | 4,706 Kb |
CSS Birthday Cake | 8,353 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 |
Ball Physics | Getsetbro | 3,149 Kb |
Modal Dialog | Gigaleet | 2,251 Kb |
SlideupBoxes | Gavra | 23,772 Kb |
Slider css only | Armandobau | 2,161 Kb |
Portfolio Page | HuffmanJ25 | 5,240 Kb |
Animate a paper plane along an SVG path, looking ahead | PotatoDie | 3,734 Kb |
Week7 replicate | Hwcasis | 1,620 Kb |
A Pen by Rob Levin | Roblevin | 2,787 Kb |
Hoi hoi | JohnTheCat | 7,248 Kb |
Css3 only dropdown menu | Riogrande | 2,519 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!