Stupid RTL Demo
How do I make an stupid rtl demo?
Used old codepens to demonstrate this stupid joke functionality to a friend at work.. What is a stupid rtl demo? How do you make a stupid rtl demo? This script and codes were developed by Chris Burnell on 16 September 2022, Friday.
Stupid RTL Demo - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Stupid RTL Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ html, body { height: 100%;
}
body { background: mintcream; color: gray; position: relative;
}
.container { font: bold normal 18px/1.618em "Helvetica Neue", Arial, sans-serif; width: 80%; position: absolute; top: 25%; left: 50%; margin-left: -40%;
}
input { opacity: 0; width: 200px; height: 60px; display: block; position: absolute; cursor: pointer; z-index: 10;
}
.check { background: green; color: mintcream; width: 200px; overflow: hidden; line-height: 60px; text-align: center; cursor: pointer; margin-bottom: 1em; z-index: 9; border-radius: 3px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: all .2s ease-in-out; transition: all .2s ease-in-out;
}
input:checked + .check { background: green; color: #efefef; padding-left: 56px; /* mAgIc NuMbErS */ position: relative;
}
.check:after { background: rgba(0,0,0,.2); color: #efefef !important; padding: 0 0.5em; display: none; position: absolute; left: 0; content: "✔"; font-size: 2em; border-radius: 3px 0 0 3px; -webkit-transition: left .25s ease-in-out; transition: left .25s ease-in-out;
}
input:checked + .check:after { display: inline;
}
span { float: left; }
input:checked ~ span { float: right; } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="container"> <input type="checkbox"> <div class="check">Left to right</div> <span>I</span> <span>t</span> <span> </span> <span>i</span> <span>s</span> <span> </span> <span>s</span> <span>u</span> <span>p</span> <span>e</span> <span>r</span> <span> </span> <span>e</span> <span>a</span> <span>s</span> <span>y</span> <span> </span> <span>n</span> <span>o</span> <span>w</span> <span>a</span> <span>d</span> <span>a</span> <span>y</span> <span>s</span> <span> </span> <span>t</span> <span>o</span> <span> </span> <span>c</span> <span>o</span> <span>n</span> <span>v</span> <span>e</span> <span>r</span> <span>t</span> <span> </span> <span>y</span> <span>o</span> <span>u</span> <span>r</span> <span> </span> <span>w</span> <span>o</span> <span>r</span> <span>d</span> <span>s</span> <span> </span> <span>f</span> <span>r</span> <span>o</span> <span>m</span> <span> </span> <span>R</span> <span>T</span> <span>L</span> <span> </span> <span>t</span> <span>o</span> <span> </span> <span>L</span> <span>T</span> <span>R</span> <span>.</span>
</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>
Stupid RTL Demo - Script Codes CSS Codes
html, body { height: 100%;
}
body { background: mintcream; color: gray; position: relative;
}
.container { font: bold normal 18px/1.618em "Helvetica Neue", Arial, sans-serif; width: 80%; position: absolute; top: 25%; left: 50%; margin-left: -40%;
}
input { opacity: 0; width: 200px; height: 60px; display: block; position: absolute; cursor: pointer; z-index: 10;
}
.check { background: green; color: mintcream; width: 200px; overflow: hidden; line-height: 60px; text-align: center; cursor: pointer; margin-bottom: 1em; z-index: 9; border-radius: 3px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: all .2s ease-in-out; transition: all .2s ease-in-out;
}
input:checked + .check { background: green; color: #efefef; padding-left: 56px; /* mAgIc NuMbErS */ position: relative;
}
.check:after { background: rgba(0,0,0,.2); color: #efefef !important; padding: 0 0.5em; display: none; position: absolute; left: 0; content: "✔"; font-size: 2em; border-radius: 3px 0 0 3px; -webkit-transition: left .25s ease-in-out; transition: left .25s ease-in-out;
}
input:checked + .check:after { display: inline;
}
span { float: left; }
input:checked ~ span { float: right; }
Stupid RTL Demo - Script Codes JS Codes
$('input').click(function() { if($(this).is(':checked')) $('.check').text('Right to left'); else $('.check').text('Left to right');
});
Developer | Chris Burnell |
Username | chrisburnell |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 3,075 Kb |
Views | 28,336 |
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 |
The power of transform for centering | 3,747 Kb |
Student Charter Demo for City University | 5,837 Kb |
The Importance of Proper Navigational CSS | 3,165 Kb |
Modal Container without JS | 3,272 Kb |
Infinite Square | 2,937 Kb |
Interaction Jazz | 11,103 Kb |
Interesting Hover Animation | 2,686 Kb |
Slip-n-slide Modal | 3,316 Kb |
Flyknife Comics | 2,934 Kb |
Cutaway Indicator | 2,435 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 |
Flat UI Button | Honchoman | 2,289 Kb |
Website Concept | Sagoza | 3,104 Kb |
Lunar eclipse | Ademilter | 2,056 Kb |
Break Out | AzazelN28 | 12,431 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
See Through | Larrygeams | 77,410 Kb |
Popover | Teles | 2,248 Kb |
A simple log in form made with css | Mayurelbhar | 2,160 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
Feedback Page | TessDiNapoli | 2,836 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!