Text Fade Out
How do I make an text fade out?
What is a text fade out? How do you make a text fade out? This script and codes were developed by Joanne Whelan on 16 January 2023, Monday.
Text Fade Out - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Text Fade Out</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="article"> <p>A DJ plays records in sequence, by cueing them up in turn and mixing them in and out. A surprisingly common misconception is that DJ’s create the music they play whilst on the go – in reality that happens at great length in a studio somewhere with a raft of instruments, synthesisers, samples and other technical equipment. Some DJ’s do play ‘live’ – much like a rock band does – but this requires a totally different setup, and is fundamentally different to DJing.</p> <p class="read-more"><a href="#" class="button">Read More</a></p>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Text Fade Out - Script Codes CSS Codes
* { font-family: century gothic;
}
.article { background-color: lightgrey; padding: 50px; width: 200px; margin: 20px;
}
.article { max-height: 120px; position: relative; overflow: hidden;
}
.article .read-more { position: absolute; bottom: 0; left: 0; width: 100%; text-align: center; margin: 0; padding: 30px 0; background-image: linear-gradient(to bottom, transparent, black);
}
.button { box-shadow:inset 0px 1px 0px 0px #efdcfb; background:linear-gradient(to bottom, #dfbdfa 5%, #bc80ea 100%); background-color:#dfbdfa; border-radius:6px; border:1px solid #c584f3; display:inline-block; cursor:pointer; color:#ffffff; font-family:century gothic; font-size:15px; font-weight:bold; padding:6px 24px; text-decoration:none; text-shadow:0px 1px 0px #9752cc;
}
.button:hover { background-color:#bc80ea;
}
.button:active { position:relative; top:1px;
}
Text Fade Out - Script Codes JS Codes
var $el, $ps, $up, totalHeight;
$('.article .button').click(function() { totalHeight = 0 $el = $(this); $p = $el.parent(); $up = $p.parent(); $ps = $up.find("p:not('.read-more')"); // measure how tall inside should be by adding together heights of all inside paragraphs (except read-more paragraph) $ps.each(function() { totalHeight += $(this).outerHeight(); }); $up .css({ // Set height to prevent instant jumpdown when max height is removed "height": $up.height(), "max-height": 9999 }) .animate({ "height": totalHeight }); // fade out read-more $p.fadeOut(); // prevent jump-down return false;
});
Developer | Joanne Whelan |
Username | jooonebug |
Uploaded | January 16, 2023 |
Rating | 3 |
Size | 2,611 Kb |
Views | 8,096 |
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 |
Class Selector | 1,534 Kb |
Simple Layout | 1,950 Kb |
Responsive Basic Layout with Flexbox | 1,853 Kb |
Wishlist | 2,690 Kb |
Image link | 1,750 Kb |
Pseudo Selectors | 1,391 Kb |
Font Awesome Examples | 1,601 Kb |
Border Effects | 1,998 Kb |
Figure | 1,633 Kb |
Decendant Selector | 1,506 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 |
CSS Org Chart | Appirio-ux | 3,882 Kb |
Resume | Rottingroom | 5,483 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
Algorithm practice | Abensur | 5,620 Kb |
Slide In Panel | Vikvarg | 2,811 Kb |
Atom | Bhlaird | 1,932 Kb |
Hello People | Danburrows | 2,365 Kb |
Main page display | BarryKe | 4,562 Kb |
Hc first draft | Stepfray | 5,104 Kb |
Responsive Boxes without Images | Andymcfee | 4,120 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!