Split fractured text

Developer
Size
2,857 Kb
Views
8,096

How do I make an split fractured text?

Playing around with split text effects, creating a fractured text look with just css.Check out some other cool text effects: http://codepen.io/collection/DamKJW/. What is a split fractured text? How do you make a split fractured text? This script and codes were developed by Mandy Michael on 16 December 2022, Friday.

Split fractured text Previews

Split fractured text - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Split fractured text</title> <link href='https://fonts.googleapis.com/css?family=Roboto:900,300' rel='stylesheet' type='text/css'> <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 class="animated" data-heading="Fracture">Fracture</h1>
</div> <script src="js/index.js"></script>
</body>
</html>

Split fractured text - Script Codes CSS Codes

html { height: 100%;
}
body { padding: 2rem; font-family: 'Roboto', sans-serif; height: 100%;
}
.wrapper { top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); position: absolute;
}
.wrapper h1 { color: black; text-align: center; font-size: 10vw; position: relative; font-weight: 900; text-transform: uppercase;
}
.wrapper h1:before { content: attr(data-heading); position: absolute; left: 0; overflow: hidden; width: 100%; height: 50%; color: white; text-shadow: 3px -2px 5px white, -3px 3px 4px white; text-align: center;
}
.wrapper h1:after { content: attr(data-heading); position: absolute; left: 0; -webkit-transform: translateX(-10px); transform: translateX(-10px); overflow: hidden; width: 100%; height: 49%; color: black;
}
h1.animated:after { -webkit-transform: translateX(0); transform: translateX(0); -webkit-animation: fracture 5s infinite ease; animation: fracture 5s infinite ease;
}
@-webkit-keyframes fracture { 0% { -webkit-transform: translateX(0); transform: translateX(0); } 50% { -webkit-transform: translateX(-20px); transform: translateX(-20px); }
}
@keyframes fracture { 0% { -webkit-transform: translateX(0); transform: translateX(0); } 50% { -webkit-transform: translateX(-20px); transform: translateX(-20px); }
}

Split fractured text - Script Codes JS Codes

// JS is to make the text editable, not required for the effect. Thanks for the suggestion @chriscoyier!
var h1 = document.querySelector("h1");
h1.addEventListener("input", function() { this.setAttribute("data-heading", this.innerText);
});
Split fractured text - Script Codes
Split fractured text - Script Codes
Home Page Home
Developer Mandy Michael
Username mandymichael
Uploaded December 16, 2022
Rating 4.5
Size 2,857 Kb
Views 8,096
Do you need developer help for Split fractured text?

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 video scripts 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!