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 |
Simple CSS Checkbox | 3,244 Kb |
Interaction Jazz | 11,103 Kb |
Square Illusion | 3,295 Kb |
Cutaway Indicator | 2,435 Kb |
Psychedelic Slice | 2,681 Kb |
Zoomy Anchor Thing | 2,680 Kb |
Persistent Light Source Transform | 2,785 Kb |
Interesting Hover Animation | 2,686 Kb |
The power of transform for centering | 3,747 Kb |
Modal Container without JS | 3,272 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 |
Personal Website Redesign v2.0 | DevItWithDavid | 5,168 Kb |
Mondrian | Chrisarmstrong | 2,787 Kb |
SCSS Social Icons Flat | Mattsince87 | 3,482 Kb |
Single element checkbox | Ivijaygupta | 1,996 Kb |
Retina canvas w. resize | Erikterwan | 1,882 Kb |
Form Labels | Bartuc | 2,717 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
Loading Bar | Jaradlight | 2,333 Kb |
Falling Down the Rabbit Hole | Rachelnabors | 4,578 Kb |
Sticky notes with CSS3 | HaiNguyen007 | 2,146 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!