CSS only 3D paper fold text effect

Developer
Size
3,363 Kb
Views
16,192

How do I make an css only 3d paper fold text effect?

Attempt at a paper folding effect with text so that it looks like it's coming off the page. Not supported in IE, or Firefox. This is using experimental clip-path property. . What is a css only 3d paper fold text effect? How do you make a css only 3d paper fold text effect? This script and codes were developed by Mandy Michael on 16 December 2022, Friday.

CSS only 3D paper fold text effect Previews

CSS only 3D paper fold text effect - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS only 3D paper fold text effect</title> <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:700,900" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrapper">	<h1 contenteditable data-heading="Folded">Folded</h1>
</div> <script src="js/index.js"></script>
</body>
</html>

CSS only 3D paper fold text effect - Script Codes CSS Codes

html, body { height: 100%;
}
body { background: -webkit-linear-gradient(45deg, #e6e2df 80%, #c2c1bd 100%); background: linear-gradient(45deg, #e6e2df 80%, #c2c1bd 100%); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.wrapper { width: 100%; font-family: 'Source Code Pro', monospace; margin: 0 auto; height: 100%;
}
.wrapper h1 { text-transform: uppercase; -webkit-transform: translate(-50%, -50%) skew(10deg) rotate(-10deg); transform: translate(-50%, -50%) skew(10deg) rotate(-10deg); font-size: 20vw; top: 50%; left: 50%; margin: 0; position: absolute; text-rendering: optimizeLegibility; font-weight: 900; color: rgba(255, 158, 177, 0.5); text-shadow: 1px 4px 6px #e6e2df, 0 0 0 #66303a, 1px 4px 6px #e6e2df; white-space: nowrap;
}
.wrapper h1:before { content: attr(data-heading); position: absolute; left: 0; top: -4.8%; overflow: hidden; width: 100%; height: 50%; color: #fbf7f4; -webkit-transform: translate(1.6vw, 0) skew(-13deg) scale(1, 1.2); transform: translate(1.6vw, 0) skew(-13deg) scale(1, 1.2); z-index: 2; text-shadow: 2px -1px 6px rgba(0, 0, 0, 0.2);
}
.wrapper h1:after { content: attr(data-heading); position: absolute; left: 0; top: 0; overflow: hidden; width: 100%; height: 100%; z-index: 1; color: #d3cfcc; -webkit-transform: translate(0vw, 0) skew(13deg) scale(1, 0.8); transform: translate(0vw, 0) skew(13deg) scale(1, 0.8); -webkit-clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0% 100%); clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0% 100%); text-shadow: 2px -1px 6px rgba(0, 0, 0, 0.3);
}

CSS only 3D paper fold text effect - Script Codes JS Codes

// JS for content editable trick from Chris Coyier
var h1 = document.querySelector("h1");
h1.addEventListener("input", function() { this.setAttribute("data-heading", this.innerText);
});
CSS only 3D paper fold text effect - Script Codes
CSS only 3D paper fold text effect - Script Codes
Home Page Home
Developer Mandy Michael
Username mandymichael
Uploaded December 16, 2022
Rating 4.5
Size 3,363 Kb
Views 16,192
Do you need developer help for CSS only 3D paper fold text effect?

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!

Mandy Michael (mandymichael) Script Codes
Create amazing sales emails with AI!

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!