HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<button id="btn1" class="btn-1"><span>Click here</span></button>
<button id="btn2" class="btn-2"><span>Click here</span></button>
<button id="btn3" class="btn-3"><span>Click here</span></button>
<button id="btn4" class="btn-4"><span>Click here</span></button>
<button id="btn5" class="btn-5"><span>Click here</span></button>
<button id="btn6" class="btn-6"><span>Click here</span></button>
<button id="btn7" class="btn-7"><span>Click here</span></button>
<button id="btn8" class="btn-8"><span>Click here</span></button>
<button id="btn9" class="btn-9"><span>Click here</span></button>
<button id="btn10" class="btn-10"><span>Click here</span></button>
<button id="btn11" class="btn-11"><span>Click here</span></button>
<button id="btn12" class="btn-12"><span>Click here</span></button>
<button id="btn13" class="btn-13"><span>Click here</span></button>
<button id="btn14" class="btn-14"><span>Click here</span></button>
<button id="btn15" class="btn-15"><span>Click here</span></button>
<button id="btn16" class="btn-16"><span>Click here</span></button>
<button id="btn17" class="btn-17"><span>Click here</span></button>
<button id="btn18" class="btn-18"><span>Click here</span></button>
<button id="btn19" class="btn-19"><span>Click here</span></button>
<button id="btn20" class="btn-20"><span>Click here</span></button>
<button id="btn21" class="btn-21"><span>Click here</span></button>
<button id="btn22" class="btn-22"><span>Click here</span></button>
<button id="btn23" class="btn-23"><span>Click here</span></button>
<button id="btn24" class="btn-24"><span>Click here</span></button>
<button id="btn25" class="btn-25"><span>Click here</span></button>
<button id="btn26" class="btn-26"><span>Click here</span></button>
<button id="btn27" class="btn-27"><span>Click here</span></button>
<button id="btn28" class="btn-28"><span>Click here</span></button>
</div>
html {
background-color: #333;
transition: 0.5s;
}
h1 {
font-family: Marvel;
font-size: 50pt;
margin-top: 15px;
line-height: 50pt;
transition: 0.5s;
color: #bbb;
}
h6 {
font-family: Marvel;
font-size: 20pt;
text-align: center;
margin-top: -25px;
margin-bottom: 15px;
line-height: 20px;
padding: none;
transition: 0.5s;
color: #bbb;
}
button {
cursor: pointer;
letter-spacing: 2px;
text-transform: uppercase;
font-family: Marvel;
font-size: 20pt;
width: 200px;
height: 45px;
position: relative;
border: solid #bbb 2px;
color: #bbb;
z-index: 1;
transition: all 0.5s ease-in-out;
border-radius: 5px;
margin: 5px;
}
button:focus {
outline: none;
}
.button-container {
width: 852px;
margin-left: auto;
margin-right: auto;
margin-bottom: 0px;
}
h4 {
padding: 0px;
line-height: .1;
margin: 13px;
}
a {
color: red;
text-decoration: none;
background: #f1f1f1;
padding-left: 5px;
padding-right: 5px;
border-radius: 15px;
transition: all 0.3s ease-in-out;
}
a:hover {
color: #f1f1f1;
background-color: red
}
#footer {
position: relative;
top: 4px;
padding-bottom: 0px;
text-align: center;
font-family: Marvel;
font-size: 13pt;
color: #f1f1f1;
line-height: 1;
width: 99%;
}
@media screen and (max-width: 880px) {
.button-container {
width: 424px;
}
}
@media screen and (max-width: 445px) {
.button-container {
width: 200px;
}
}
.btn-1 {
background: #333;
padding: 0;
}
.btn-1 span {
position: relative;
display: block;
width: 100%;
height: 100%;
padding-top: 5px;
transition: 0.5s ease-in-out;
}
.btn-1:before,
.btn-1:after {
position: absolute;
content: "";
right: 0;
bottom: 0;
background: red;
transition: all 0.5s ease-in-out;
}
.btn-1:before {
height: 0%;
width: 2px;
top: 50%;
}
.btn-1:after {
width: 0%;
height: 2px;
left: 50%;
}
.btn-1:hover:before {
height: 100%;
top: 0%;
background: red;
}
.btn-1:hover:after {
width: 100%;
left: 0%;
background: red;
}
.btn-1:hover {
background: transparent;
border-color: #333;
}
.btn-1 span:hover {
color: red;
}
.btn-1 span:before,
.btn-1 span:after {
position: absolute;
content: "";
left: 0;
top: 0;
background: #333;
transition: all 0.5s ease-in-out;
}
.btn-1 span:before {
width: 2px;
height: 0%;
top: 50%;
}
.btn-1 span:after {
height: 2px;
width: 0%;
left: 50%;
}
.btn-1 span:hover:before {
height: 41px;
top: 0%;
background: red;
}
.btn-1 span:hover:after {
width: 100%;
left: 0%;
background: red;
}
.btn-1:active {
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-1:active:before,
.btn-1:active:after {
background-color: #00a7fc;
}
.btn-1 span:active {
color: #333;
}
.btn-1 span:active:before,
.btn-1 span:active:after {
background-color: #00a7fc;
}
.btn-2 {
background-image: -webkit-linear-gradient(30deg, transparent 50%, red 50%);
background-image: linear-gradient(30deg, transparent 50%, red 50%);
background-size: 298%;
background-color: transparent;
background-repeat: no-repeat;
background-position: 0%;
}
.btn-2:hover {
background-position: 100%;
color: #f1f1f1;
border-color: red;
}
.btn-2:active {
background-color: #00a7fc;
color: #333;
background-position: 0%;
border-color: #00a7fc;
}
.btn-3 {
background: #333;
}
.btn-3:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: red;
transform: scale(0);
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-3:hover:before {
transform: scale(1);
}
.btn-3:hover {
color: #f1f1f1;
border-color: red;
}
.btn-3:active:before {
background-color: #00a7fc;
}
.btn-3:active {
border-color: #00a7fc;
color: #333;
background-color: #00a7fc;
}
.btn-4 {
background: red;
}
.btn-4:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: #333;
transform: scale(1);
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-4:hover:before {
transform: scale(0);
}
.btn-4:hover {
color: #f1f1f1;
border-color: red;
}
.btn-4:active {
border-color: #00a7fc;
color: #333;
background-color: #00a7fc;
}
.btn-4:active:before {
background-color: #00a7fc;
}
.btn-5 {
background: #333;
}
.btn-5:before {
content: "";
width: 0%;
height: 100%;
position: absolute;
top: 0;
right: 0;
background-color: red;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-5:hover:before {
width: 100%;
}
.btn-5:hover {
color: #f1f1f1;
border-color: red;
}
.btn-5:active:before {
background-color: #00a7fc;
}
.btn-5:active {
border-color: #00a7fc;
background-color: #00a7fc;
color: #333;
}
.btn-6 {
background: #333;
}
.btn-6:before {
content: "";
width: 0%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: red;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-6:hover:before {
width: 100%;
}
.btn-6:hover {
color: #f1f1f1;
border-color: red;
}
.btn-6:active:before {
background-color: #00a7fc;
}
.btn-6:active {
border-color: #00a7fc;
background-color: #00a7fc;
color: #333;
}
.btn-7 {
background: #333;
}
.btn-7:before {
content: "";
width: 100%;
height: 0%;
position: absolute;
top: 0;
right: 0;
background-color: red;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-7:hover:before {
height: 100%;
}
.btn-7:hover {
color: #f1f1f1;
border-color: red;
}
.btn-7:active:before {
background-color: #00a7fc;
}
.btn-7:active {
border-color: #00a7fc;
background-color: #00a7fc;
color: #333;
}
.btn-8 {
background: #333;
}
.btn-8:before {
content: "";
width: 100%;
height: 0%;
position: absolute;
bottom: 0;
right: 0;
background-color: red;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-8:hover:before {
height: 100%;
}
.btn-8:hover {
color: #f1f1f1;
border-color: red;
}
.btn-8:active:before {
background-color: #00a7fc;
}
.btn-8:active {
border-color: #00a7fc;
background-color: #00a7fc;
color: #333;
}
.btn-9 {
background: #333;
}
.btn-9:before {
content: "";
width: 0%;
height: 100%;
position: absolute;
top: 0;
right: 50%;
background-color: red;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-9:hover:before {
width: 100%;
right: 0%;
}
.btn-9:hover {
color: #f1f1f1;
border-color: red;
}
.btn-9:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-9:active:before {
background-color: #00a7fc;
}
.btn-10 {
background: red;
}
.btn-10:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
right: 0%;
background-color: #333;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-10:hover:before {
width: 0%;
right: 50%;
}
.btn-10:hover {
color: #f1f1f1;
border-color: red;
}
.btn-10:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-10:active:before {
background-color: #00a7fc;
}
.btn-11 {
background: #333;
}
.btn-11:before {
content: "";
width: 100%;
height: 0%;
position: absolute;
top: 50%;
right: 0%;
background-color: red;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-11:hover:before {
height: 100%;
top: 0%;
}
.btn-11:hover {
color: #f1f1f1;
border-color: red;
}
.btn-11:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-11:active:before {
background-color: #00a7fc;
}
.btn-12 {
background: red;
}
.btn-12:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0%;
right: 0%;
background-color: #333;
transition: 0.5s ease-in-out;
z-index: -1;
}
.btn-12:hover:before {
height: 0%;
top: 50%;
}
.btn-12:hover {
color: #f1f1f1;
border-color: red;
}
.btn-12:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-12:active:before {
background-color: #00a7fc;
}
.btn-13 {
background-color: #333;
}
.btn-13:hover {
color: #f1f1f1;
border-color: red;
}
.btn-13:hover:before {
left: 0%;
right: auto;
width: 100%;
}
.btn-13:before {
position: absolute;
top: 0px;
right: 0px;
width: 0%;
height: 100%;
z-index: -1;
content: "";
color: #f1f1f1;
background: red;
transition: all 500ms ease-in-out;
}
.btn-13:active:before {
background-color: #00a7fc;
}
.btn-13:active {
color: #333;
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-14 {
background-color: #333;
}
.btn-14:hover {
color: #f1f1f1;
border-color: red;
}
.btn-14:hover:before {
right: 0%;
left: auto;
width: 100%;
}
.btn-14:before {
position: absolute;
top: 0px;
left: 0px;
width: 0%;
height: 100%;
z-index: -1;
content: "";
color: #f1f1f1;
background: red;
transition: all 500ms ease-in-out;
}
.btn-14:active:before {
background-color: #00a7fc;
}
.btn-14:active {
color: #333;
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-15 {
background-color: #333;
}
.btn-15:hover {
color: #f1f1f1;
border-color: red;
}
.btn-15:hover:before {
bottom: 0%;
top: auto;
height: 100%;
}
.btn-15:before {
position: absolute;
top: 0px;
left: 0px;
height: 0%;
width: 100%;
z-index: -1;
content: "";
color: #f1f1f1;
background: red;
transition: all 500ms ease-in-out;
}
.btn-15:active:before {
background-color: #00a7fc;
}
.btn-15:active {
color: #333;
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-16 {
background-color: #333;
}
.btn-16:hover {
color: #f1f1f1;
border-color: red;
}
.btn-16:hover:before {
top: 0%;
bottom: auto;
height: 100%;
}
.btn-16:before {
position: absolute;
bottom: 0px;
left: 0px;
height: 0%;
width: 100%;
z-index: -1;
content: "";
color: #f1f1f1;
background: red;
transition: all 500ms ease-in-out;
}
.btn-16:active:before {
background-color: #00a7fc;
}
.btn-16:active {
color: #333;
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-17 {
background: #333;
overflow: hidden;
transition: all 0.3s ease-in-out 0s;
}
.btn-17:before {
content: "";
height: 0%;
width: 0%;
background: red;
position: absolute;
top: 50%;
right: 50%;
border-radius: 20px;
z-index: -1;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transform: translateX(50%) translateY(-50%) rotate(-45deg);
}
.btn-17:hover:before {
animation: btn-17 2s;
background-color: red;
}
.btn-17:hover {
color: #f1f1f1;
border-color: red;
background-color: red;
transition: background-color 0.5s ease-in-out 0.8s;
}
@keyframes btn-17 {
0% {
height: 0%;
width: 0%;
}
25% {
height: 250%;
width: 600%;
}
50% {
height: 600%;
width: 600%;
}
75% {
height: 100%;
width: 600%;
}
100% {
height: 0%;
width: 0%;
}
}
.btn-18 {
background: #333;
overflow: hidden;
transition: all 0.3s ease-in-out 0s;
}
.btn-18:before {
content: "";
height: 0%;
width: 0%;
background: red;
position: absolute;
top: 50%;
right: 50%;
border-radius: 20px;
z-index: -1;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transform: translateX(50%) translateY(-50%) rotate(45deg);
}
.btn-18:hover:before {
animation: btn-18 2s;
background-color: red;
}
.btn-18:hover {
color: #f1f1f1;
border-color: red;
background-color: red;
transition: background-color 0.5s ease-in-out 0.8s;
}
@keyframes btn-18 {
0% {
height: 0%;
width: 0%;
}
25% {
height: 250%;
width: 600%;
}
50% {
height: 600%;
width: 600%;
}
75% {
height: 100%;
width: 600%;
}
100% {
height: 0%;
width: 0%;
}
}
.btn-19 {
overflow: hidden;
background: #333;
}
.btn-19:before {
content: "";
position: absolute;
background: red;
width: 0%;
height: 0%;
border-radius: 50%;
z-index: -1;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
-webkit-transition: all 0.5s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
}
.btn-19:hover:before {
width: 110%;
height: 300px;
}
.btn-19:hover {
color: #f1f1f1;
border-color: red;
}
.btn-19:active:before {
background-color: #00a7fc;
}
.btn-19:active {
color: #333;
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-20 {
overflow: hidden;
background-color: red;
}
.btn-20:before {
content: "";
position: absolute;
background: #333;
width: 110%;
height: 300px;
border-radius: 50%;
z-index: -1;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
-webkit-transition: all 0.5s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
}
.btn-20:hover:before {
width: 0%;
height: 0%;
}
.btn-20:hover {
color: #f1f1f1;
border-color: red;
}
.btn-20:active:before {
background-color: #00a7fc;
}
.btn-20:active {
color: #333;
background-color: #00a7fc;
border-color: #00a7fc;
}
.btn-21 {
cursor: pointer;
letter-spacing: 2px;
text-transform: uppercase;
font-family: Marvel;
font-size: 20pt;
width: 200px;
height: 45px;
position: relative;
color: #bbb;
z-index: 1;
transition: all 0.5s ease-in-out;
border-radius: 0px;
margin: 5px;
background: transparent;
padding: 0;
overflow: hidden;
border: none;
}
.btn-21:before {
content: "";
position: absolute;
bottom: 0;
right: 0;
width: 100%;
height: 2px;
background: linear-gradient(to left, transparent, #bbb);
animation: btn-21-left 2s linear infinite;
transition: 0.5s ease-in-out;
}
.btn-21:after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 2px;
height: 100%;
background: linear-gradient(to top, transparent, #bbb);
animation: btn-21-top 2s linear infinite;
animation-delay: 1s;
transform: translateY(-100%);
}
.btn-21 span {
position: relative;
display: block;
width: 100%;
height: 100%;
padding: 6px;
}
.btn-21 span:after {
content: "";
position: absolute;
top: 0px;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(to right, transparent, #bbb);
animation: btn-21-right 2s linear infinite;
}
.btn-21 span:before {
content: "";
position: absolute;
top: 0px;
right: 12px;
width: 2px;
height: 100%;
background: linear-gradient(to bottom, transparent, #bbb);
animation: btn-22-bottom 2s linear infinite;
animation-delay: 1s;
transform: translateY(-100%)
}
.btn-21:hover:before {
background: linear-gradient(to left, transparent, red);
}
.btn-21:hover:after {
background: linear-gradient(to top, transparent, red);
}
.btn-21 span:hover:before {
background: linear-gradient(to bottom, transparent, red);
}
.btn-21 span:hover:after {
background: linear-gradient(to right, transparent, red);
}
.btn-21:hover {
color: red;
}
.btn-21:active:before {
background: linear-gradient(to left, transparent, #00a7fc);
}
.btn-21:active:after {
background: linear-gradient(to top, transparent, #00a7fc);
}
.btn-21 span:active:before {
background: linear-gradient(to bottom, transparent, #00a7fc);
}
.btn-21 span:active:after {
background: linear-gradient(to right, transparent, #00a7fc);
}
.btn-21:active {
color: #00a7fc;
}
@keyframes btn-21-top {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(-100%);
}
}
@keyframes btn-21-left {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-100%);
}
}
@keyframes btn-21-bottom {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(100%);
}
}
@keyframes btn-21-right {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
.btn-22 {
cursor: pointer;
letter-spacing: 2px;
text-transform: uppercase;
font-family: Marvel;
font-size: 20pt;
width: 200px;
height: 45px;
position: relative;
color: #bbb;
z-index: 1;
transition: all 0.5s ease-in-out;
border-radius: 0px;
margin: 5px;
background: transparent;
padding: 0;
overflow: hidden;
border: none;
}
.btn-22:before {
content: "";
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 2px;
background: linear-gradient(to left, transparent, #bbb);
animation: btn-22-left 2s linear infinite;
transition: 0.5s ease-in-out;
}
.btn-22:after {
content: "";
position: absolute;
bottom: 0;
right: 0;
width: 2px;
height: 100%;
background: linear-gradient(to top, transparent, #bbb);
animation: btn-22-top 2s linear infinite;
animation-delay: 1s;
transform: translateY(-100%);
}
.btn-22 span {
position: relative;
display: block;
width: 100%;
height: 100%;
padding: 6px;
}
.btn-22 span:after {
content: "";
position: absolute;
bottom: 12px;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(to right, transparent, #bbb);
animation: btn-22-right 2s linear infinite;
}
.btn-22 span:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 2px;
height: 100%;
background: linear-gradient(to bottom, transparent, #bbb);
animation: btn-22-bottom 2s linear infinite;
animation-delay: 1s;
transform: translateY(-100%)
}
.btn-22:hover:before {
background: linear-gradient(to left, transparent, red);
}
.btn-22:hover:after {
background: linear-gradient(to top, transparent, red);
}
.btn-22 span:hover:before {
background: linear-gradient(to bottom, transparent, red);
}
.btn-22 span:hover:after {
background: linear-gradient(to right, transparent, red);
}
.btn-22:hover {
color: red;
}
.btn-22:active:before {
background: linear-gradient(to left, transparent, #00a7fc);
}
.btn-22:active:after {
background: linear-gradient(to top, transparent, #00a7fc);
}
.btn-22 span:active:before {
background: linear-gradient(to bottom, transparent, #00a7fc);
}
.btn-22 span:active:after {
background: linear-gradient(to right, transparent, #00a7fc);
}
.btn-22:active {
color: #00a7fc;
}
@keyframes btn-22-top {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(-100%);
}
}
@keyframes btn-22-left {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(-100%);
}
}
@keyframes btn-22-bottom {
0% {
transform: translateY(-100%);
}
100% {
transform: translateY(100%);
}
}
@keyframes btn-22-right {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
.btn-23 {
overflow: hidden;
background-color: #333;
}
.btn-23:before {
content: "";
position: absolute;
left: 50%;
top: 0;
height: 100%;
width: 0%;
background: red;
border-radius: 23px;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-23:hover:before {
width: 120%;
left: -10%;
}
.btn-23:hover {
color: #f1f1f1;
border-color: red;
}
.btn-23:active {
border-color: #00a7fc;
color: #333;
background-color: #00a7fc;
}
.btn-23:active:before {
background-color: #00a7fc;
}
.btn-23:active {
background-color: #00a7fc;
border-color: #00a7fc;
color: #333;
}
.btn-23:active:before {
background-color: #00a7fc;
}
.btn-24 {
background: #f1f1f1;
overflow: hidden;
background-color: red;
}
.btn-24:before {
content: "";
position: absolute;
height: 100%;
top: 0;
width: 120%;
left: -10%;
background-color: #333;
transition: all 0.5s ease-in-out;
border-radius: 23px;
z-index: -1;
}
.btn-24:hover {
color: #f1f1f1;
border-color: red;
}
.btn-24:hover:before {
width: 0%;
left: 50%;
}
.btn-24:active {
background-color: #00a7fc;
border-color: #00a7fc;
color: #333;
}
.btn-24:active:before {
background-color: #00a7fc;
}
.btn-25 {
background: #333;
}
.btn-25:before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 50%;
height: 0%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-25:after {
content: "";
position: absolute;
right: 0;
bottom: 0;
width: 50%;
height: 0%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-25:hover {
color: #f1f1f1;
border-color: red;
}
.btn-25:hover:before,
.btn-25:hover:after {
height: 100%;
}
.btn-25:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-25:active:before,
.btn-25:active:after {
background-color: #00a7fc;
}
.btn-26 {
background: #333;
}
.btn-26:before {
content: "";
position: absolute;
right: 0;
top: 0;
width: 50%;
height: 0%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-26:after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 50%;
height: 0%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-26:hover {
color: #f1f1f1;
border-color: red;
}
.btn-26:hover:before,
.btn-26:hover:after {
height: 100%;
}
.btn-26:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-26:active:before,
.btn-26:active:after {
background-color: #00a7fc;
}
.btn-27 {
background: #333;
}
.btn-27:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 50%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-27:after {
content: "";
position: absolute;
bottom: 0%;
right: 0%;
width: 0%;
height: 50%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-27:hover {
color: #f1f1f1;
border-color: red;
}
.btn-27:hover:before,
.btn-27:hover:after {
width: 100%;
}
.btn-27:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-27:active:before,
.btn-27:active:after {
background-color: #00a7fc;
}
.btn-28 {
background: #333;
}
.btn-28:before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 0%;
height: 50%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-28:after {
content: "";
position: absolute;
top: 0%;
right: 0%;
width: 0%;
height: 50%;
background-color: red;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.btn-28:hover {
color: #f1f1f1;
border-color: red;
}
.btn-28:hover:before,
.btn-28:hover:after {
width: 100%;
}
.btn-28:active {
color: #333;
border-color: #00a7fc;
background-color: #00a7fc;
}
.btn-28:active:before,
.btn-28:active:after {
background-color: #00a7fc;
}
/*
Following code is for copying button code
*/
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
opacity: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.4);
transition: opacity 0.3s ease-in-out;
}
.modal-box {
background-color: transparent;
position: absolute;
width: 80%;
height: 80%;
left: 100px;
top: 50px;
}
.close {
position: fixed;
width: auto;
height: auto;
background-color: transparent;
border: none;
padding: 0px;
top: 10px;
right: 10px;
color: #f1f1f1;
cursor: pointer;
}
.content {
position: absolute;
padding: 10px;
background-color: #111;
font-size: 10pt;
font-family: "Nova Mono";
color: #f1f1f1;
overflow: auto;
transition: opacity 0.3s ease-in-out;
border-radius: 0px 25px 25px 25px
}
.content::-webkit-scrollbar {
width: 0;
}
.content::-webkit-scrollbar-track {
background: #111;
}
.content::-webkit-scrollbar-thumb {
background: #666;
}
.content::-webkit-scrollbar-thumb:hover {
background: #888;
}
.modal-box-buttons {
position: relative;
max-height: 50px;
padding: 0px;
background: transparent;
z-index: 100;
}
.modal-box-buttons-button {
width: 100px;
height: 50px;
background: #111;
font-family: "Nova Mono";
font-size: 20pt;
cursor: pointer;
margin-left: 0px;
margin-top: 0px;
border: none;
border-radius: 25px 25px 0px 0px;
margin-right: 0px;
transition: all 0.3s ease-in-out;
color: #f1f1f1;
}
.css {
display: none;
}
#copy-button {
width: 250px;
position: absolute;
bottom: 0px;
}
#copy-button button {
position: relative;
width: 120px;
height: 35px;
font-size: 17pt;
bottom: 0px;
letter-spacing: normal;
padding: 0px;
border: none;
background-color: red;
color: #f1f1f1;
border-radius: 3px;
margin: 0px;
margin-right: 5px;
transition: box-shadow 0.2s ease-in-out, bottom 0.2s ease-in-out;
box-shadow: 0px 0px 10px 1px #000;
}
#copy-button button:hover {
box-shadow: 0px 5px 40px 5px #000;
bottom: 2px;
}
#copy-button button:active {
box-shadow: none;
bottom: 0px;
}
#copy-message {
font-family: Marvel;
font-size: 15pt;
color: #f1f1f1;
position: fixed;
width: 120px;
max-width: 200px;
bottom: 10px;
padding: 10px;
left: -250px;
background-color: red;
transition: all 0.3s ease-in-out;
z-index: 100;
text-align: center;
}
document.getElementById("btn1").onclick = function() { openModal(1) };
document.getElementById("btn2").onclick = function() { openModal(2) };
document.getElementById("btn3").onclick = function() { openModal(3) };
document.getElementById("btn4").onclick = function() { openModal(4) };
document.getElementById("btn5").onclick = function() { openModal(5) };
document.getElementById("btn6").onclick = function() { openModal(6) };
document.getElementById("btn7").onclick = function() { openModal(7) };
document.getElementById("btn8").onclick = function() { openModal(8) };
document.getElementById("btn9").onclick = function() { openModal(9) };
document.getElementById("btn10").onclick = function() { openModal(10) };
document.getElementById("btn11").onclick = function() { openModal(11) };
document.getElementById("btn12").onclick = function() { openModal(12) };
document.getElementById("btn13").onclick = function() { openModal(13) };
document.getElementById("btn14").onclick = function() { openModal(14) };
document.getElementById("btn15").onclick = function() { openModal(15) };
document.getElementById("btn16").onclick = function() { openModal(16) };
document.getElementById("btn17").onclick = function() { openModal(17) };
document.getElementById("btn18").onclick = function() { openModal(18) };
document.getElementById("btn19").onclick = function() { openModal(19) };
document.getElementById("btn20").onclick = function() { openModal(20) };
document.getElementById("btn21").onclick = function() { openModal(21) };
document.getElementById("btn22").onclick = function() { openModal(22) };
document.getElementById("btn23").onclick = function() { openModal(23) };
document.getElementById("btn24").onclick = function() { openModal(24) };
document.getElementById("btn25").onclick = function() { openModal(25) };
document.getElementById("btn26").onclick = function() { openModal(26) };
document.getElementById("btn27").onclick = function() { openModal(27) };
document.getElementById("btn28").onclick = function() { openModal(28) };
var modal = document.getElementById("modal");
var modalBox = document.getElementById("modal-box");
var modalBoxButtons = document.getElementById("modal-box-buttons");
var copyHTML = document.getElementById("copy-html");
var copyCSS = document.getElementById("copy-css");
var cssButton = document.getElementById("css-button");
var htmlButton = document.getElementById("html-button");
var selected = "HTML";
var modalId;
var content = document.getElementsByClassName("content");
var close = document.getElementById("closeModal");
var copyButton = document.getElementById("copy-button");
var copyTextarea = document.getElementById("copy-textarea");
var copyMessage = document.getElementById("copy-message");
var clicked = false;
window.onclick = function(event) {
if (modal.style.display == "block") {
if (event.target == modal || event.target == modalBoxButtons || event.target == close || event.target == copyButton || event.target == modalBox) {
closeModal();
}
}
}
function openModal(chosenModalId) {
modalId = chosenModalId;
copyHTML.innerHTML = '<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Marvel"><br><br><button class="btn-' + modalId + '"><br> <span>Click here</span><br></button>';
copyCSS.innerHTML = '.btn-' + modalId + ' {<br> cursor: pointer;<br> letter-spacing: 2px;<br> text-transform: uppercase;<br> font-family: Marvel;<br> font-size: 20pt;<br> width: 200px;<br> height: 45px;<br> position: relative;<br> border: solid #777 2px;<br> color: #777;<br> z-index: 1;<br> transition: all 0.5s ease-in-out;<br> border-radius: 5px;<br>'
if (modalId == 1) {
copyCSS.innerHTML += ' background: transparent;<br> padding: 0;<br>}<br><br>.btn-1 span {<br> position: relative;<br> display: block;<br> width: 100%;<br> height: 100%;<br> padding-top: 5px;<br> transition: 0.5s ease-in-out;<br>}<br><br>.btn-1:before, .btn-1:after {<br> position: absolute;<br> content: "";<br> right: 0;<br> bottom: 0;<br> background: red;<br> transition: all 0.5s ease-in-out;<br>}<br><br>.btn-1:before {<br> height: 0%;<br> width: 2px;<br> top: 50%;<br>}<br><br>.btn-1:after {<br> width: 0%;<br> height: 2px;<br> left: 50%;<br>}<br><br>.btn-1:hover:before {<br> height: 100%;<br> top: 0%;<br> background: red;<br>}<br><br>.btn-1:hover:after {<br> width: 100%;<br> left: 0%;<br> background: red;<br>}<br><br>.btn-1:hover {<br> background: transparent;<br> border-color: transparent;<br>}<br><br>.btn-1 span:hover {<br> color: red;<br>}<br><br>.btn-1 span:before, .btn-1 span:after {<br> position: absolute;<br>content: "";<br> left: 0;<br> top: 0;<br> background: #333;<br> transition: all 0.5s ease-in-out;<br>}<br><br>.btn-1 span:before {<br> width: 2px;<br> height: 0%;<br> top: 50%;<br>}<br><br>.btn-1 span:after {<br> height: 2px;<br> width: 0%;<br> left: 50%;<br>}<br><br>.btn-1 span:hover:before {<br> height: 41px;<br> top: 0%;<br> background: red;<br>}<br><br>.btn-1 span:hover:after {<br> width: 100%;<br> left: 0%; <br> background: red;<br>}<br><br>.btn-1:active {<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}<br><br>.btn-1:active:before, .btn-1:active:after {<br> background-color: #00a7fc;<br>}<br><br>.btn-1 span:active {<br> color: #333;<br>}<br><br>.btn-1 span:active:before, .btn-1 span:active:after {<br> background-color: #00a7fc;<br>}'
} else if (modalId == 2) {
copyCSS.innerHTML += ' background-image: -webkit-linear-gradient(30deg, transparent 50%, red 50%);<br> background-image: linear-gradient(30deg, transparent 50%, red 50%);<br> background-size: 298%;<br> background-color: transparent;<br> background-repeat: no-repeat;<br> background-position: 0%;<br>}<br><br>.btn-2:hover {<br> background-position: 100%;<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-2:active {<br> background-color: #00a7fc;<br> color: #333;<br> background-position: 0%;<br> border-color: #00a7fc;<br>}'
} else if (modalId == 3) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-3:before {<br> content: "";<br> width: 100%;<br> height: 100%;<br> position: absolute;<br> top: 0;<br> left: 0;<br> background: red;<br> transform: scale(0);<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-3:hover:before {<br> transform: scale(1);<br>}<br><br>.btn-3:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-3:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-3:active {<br> border-color: #00a7fc;<br> color: #333;<br> background-color: #00a7fc;<br>}'
} else if (modalId == 4) {
copyCSS.innerHTML += ' background: red;<br>}<br><br>.btn-4:before {<br> content: "";<br> width: 100%;<br> height: 100%;<br> position: absolute;<br> top: 0;<br> left: 0;<br> background-color: #fff; // Change background-color to your preference;<br> transform: scale(1);<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-4:hover:before {<br> transform: scale(0);<br>}<br><br>.btn-4:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-4:active {<br> border-color: #00a7fc;<br> color: #333;<br> background-color: #00a7fc;<br>}<br><br>.btn-4:active:before {<br> background-color: #00a7fc;<br>}'
} else if (modalId == 5) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-5:before {<br> content: "";<br> width: 0%;<br> height: 100%;<br> position: absolute;<br> top: 0;<br> right: 0;<br> background-color: red;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-5:hover:before {<br> width: 100%;<br>}<br><br>.btn-5:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-5:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-5:active {<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br> color: #333;<br>}';
} else if (modalId == 6) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-6:before {<br> content: "";<br> width: 0%;<br> height: 100%;<br> position: absolute;<br> top: 0;<br> left: 0;<br> background-color: red;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-6:hover:before {<br> width: 100%;<br>}<br><br>.btn-6:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-6:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-6:active {<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br> color: #333;<br>}';
} else if (modalId == 7) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-7:before {<br> content: "";<br> width: 100%;<br> height: 0%;<br> position: absolute;<br> top: 0;<br> right: 0;<br> background-color: red;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-7:hover:before {<br> height: 100%;<br>}<br><br>.btn-7:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-7:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-7:active {<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br> color: #333;<br>}';
} else if (modalId == 8) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-8:before {<br> content: "";<br> width: 100%;<br> height: 0%;<br> position: absolute;<br> bottom: 0;<br> right: 0;<br> background-color: red;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-8:hover:before {<br> height: 100%;<br>}<br><br>.btn-8:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-8:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-8:active {<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br> color: #333;<br>}';
} else if (modalId == 9) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-9:before {<br> content: "";<br> width: 0%;<br> height: 100%;<br> position: absolute;<br> top: 0;<br> right: 50%;<br> background-color: red;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-9:hover:before {<br> width: 100%;<br> right: 0%;<br>}<br><br>.btn-9:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-9:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br><br>.btn-9:active:before {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 10) {
copyCSS.innerHTML += ' background: red;<br>}<br><br>.btn-10:before {<br> content: "";<br> width: 100%;<br> height: 100%;<br> position: absolute;<br> top: 0;<br> right: 0%;<br> background-color: #fff; // Change background-color to your preference;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-10:hover:before {<br> width: 0%;<br> right: 50%;<br>}<br><br>.btn-10:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-10:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-10:active:before {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 11) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-11:before {<br> content: "";<br> width: 100%;<br> height: 0%;<br> position: absolute;<br> top: 50%;<br> right: 0%;<br> background-color: red;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-11:hover:before {<br> height: 100%;<br> top: 0%;<br>}<br><br>.btn-11:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-11:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-11:active:before {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 12) {
copyCSS.innerHTML += ' background: red;<br>}<br><br>.btn-12:before {<br> content: "";<br > width: 100%;<br> height: 100%;<br> position: absolute;<br> top: 0%;<br> right: 0%;<br> background-color: #fff; // Change background-color to your preference;<br> transition: 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-12:hover:before {<br> height: 0%;<br> top: 50%;<br>}<br><br>.btn-12:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-12:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-12:active:before {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 13) {
copyCSS.innerHTML += ' background-color: transparent;<br>}<br><br>.btn-13:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-13:hover:before {<br> left: 0%;<br> right: auto;<br> width: 100%;<br>}<br><br>.btn-13:before {<br> position: absolute;<br> top: 0px;<br> right: 0px;<br> width: 0%;<br> height: 100%;<br> z-index: -1;<br> content: "";<br> color: #f1f1f1;<br> background: red;<br> transition: all 500ms ease-in-out;<br>}<br><br>.btn-13:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-13:active {<br> color: #333;<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}';
} else if (modalId == 14) {
copyCSS.innerHTML += ' background-color: transparent;<br>}<br><br>.btn-14:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-14:hover:before {<br> right: 0%;<br> left: auto;<br> width: 100%;<br>}<br><br>.btn-14:before {<br> position: absolute;<br> top: 0px;<br> left: 0px;<br> width: 0%;<br> height: 100%;<br> z-index: -1;<br> content: "";<br> color: #f1f1f1;<br> background: red;<br> transition: all 500ms ease-in-out;<br>}<br><br>.btn-14:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-14:active {<br> color: #333;<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}';
} else if (modalId == 15) {
copyCSS.innerHTML += ' background-color: transparent;<br>}<br><br>.btn-15:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-15:hover:before {<br> bottom: 0%;<br> top: auto;<br> height: 100%;<br>}<br><br>.btn-15:before {<br> position: absolute;<br> top: 0px;<br> left: 0px;<br> height: 0%;<br> width: 100%;<br> z-index: -1;<br> content: "";<br> color: #f1f1f1;<br> background: red;<br> transition: all 500ms ease-in-out;<br>}<br><br>.btn-15:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-15:active {<br> color: #333;<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}';
} else if (modalId == 16) {
copyCSS.innerHTML += ' background-color: transparent;<br>}<br><br>.btn-16:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-16:hover:before {<br> top: 0%;<br> bottom: auto;<br> height: 100%;<br>}<br><br>.btn-16:before {<br> position: absolute;<br> bottom: 0px;<br> left: 0px;<br> height: 0%;<br> width: 100%;<br> z-index: -1;<br> content: "";<br> color: #f1f1f1;<br> background: red;<br> transition: all 500ms ease-in-out;<br>}<br><br>.btn-16:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-16:active {<br> color: #333;<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}';
} else if (modalId == 17) {
copyCSS.innerHTML += ' background: transparent;<br> overflow: hidden;<br> transition: all 0.3s ease-in-out 0s;<br>}<br><br>.btn-17:before {<br> content: "";<br> height: 0%;<br> width: 0%;<br> background: red;<br> position: absolute;<br> top: 50%;<br> right: 50%;<br> border-radius: 20px;<br> z-index: -1;<br> -webkit-transition: all 0.5s ease;<br> -moz-transition: all 0.5s ease;<br> -ms-transition: all 0.5s ease;<br> transform: translateX(50%) translateY(-50%) rotate(-45deg);<br>}<br><br>.btn-17:hover:before {<br> animation: btn-17 2s;<br> background-color: red;<br>}<br><br>.btn-17:hover {<br> color: #f1f1f1;<br> border-color: red;<br> background-color: red;<br> transition: background-color 0.5s ease-in-out 0.8s;<br>}<br><br>@keyframes btn-17 {<br> 0% {<br> height: 0%;<br> width: 0%;<br> }<br><br> 25% {<br> height: 250%;<br> width: 600%;<br> }<br><br> 50% {<br> height: 600%;<br> width: 600%;<br> }<br><br> 75% {<br> height: 100%;<br> width: 600%;<br> }<br><br> 100% {<br> height: 0%;<br> width: 0%;<br> }<br><br>}';
} else if (modalId == 18) {
copyCSS.innerHTML += ' background: transparent;<br> overflow: hidden;<br> transition: all 0.3s ease-in-out 0s;<br>}<br><br>.btn-18:before {<br> content: "";<br> height: 0%;<br> width: 0%;<br> background: red;<br> position: absolute;<br> top: 50%;<br> right: 50%;<br> border-radius: 20px;<br> z-index: -1;<br> -webkit-transition: all 0.5s ease;<br> -moz-transition: all 0.5s ease;<br> -ms-transition: all 0.5s ease;<br> transform: translateX(50%) translateY(-50%) rotate(45deg);<br>}<br><br>.btn-18:hover:before {<br> animation: btn-18 2s;<br> background-color: red;<br>}<br><br>.btn-18:hover {<br> color: #f1f1f1;<br> border-color: red;<br> background-color: red;<br> transition: background-color 0.5s ease-in-out 0.8s;<br>}<br><br>@keyframes btn-18 {<br> 0% {<br> height: 0%;<br> width: 0%;<br> }<br><br> 25% {<br> height: 250%;<br> width: 600%;<br> }<br><br> 50% {<br> height: 600%;<br> width: 600%;<br> }<br><br> 75% {<br> height: 100%;<br> width: 600%;<br> }<br><br> 100% {<br> height: 0%;<br> width: 0%;<br> }<br><br>}';
} else if (modalId == 19) {
copyCSS.innerHTML += ' overflow: hidden;<br> background: transparent;<br>}<br><br>.btn-19:before {<br> content: "";<br> position: absolute;<br> background: red;<br> width: 0%;<br> height: 0%;<br> border-radius: 50%;<br> z-index: -1;<br> top: 50%;<br> left: 50%;<br> transform: translateX(-50%) translateY(-50%);<br> -webkit-transition: all 0.5s ease;<br> -moz-transition: all 1s ease;<br> -ms-transition: all 1s ease;<br>}<br><br>.btn-19:hover:before {<br> width: 110%;<br> height: 300px;<br>}<br><br>.btn-19:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-19:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-19:active {<br> color: #333;<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}';
} else if (modalId == 20) {
copyCSS.innerHTML += ' overflow: hidden;<br> background-color: red;<br>}<br><br>.btn-20:before {<br> content: "";<br> position: absolute;<br> background-color: #fff; // Change background-color to your preference;<br> width: 110%;<br> height: 300px;<br> border-radius: 50%;<br> z-index: -1;<br> top: 50%;<br> left: 50%;<br> transform: translateX(-50%) translateY(-50%);<br> -webkit-transition: all 0.5s ease;<br> -moz-transition: all 1s ease;<br> -ms-transition: all 1s ease;<br>}<br><br>.btn-20:hover:before {<br> width: 0%;<br> height: 0%;<br>}<br><br>.btn-20:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-20:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-20:active {<br> color: #333;<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br>}';
} else if (modalId == 21) {
copyCSS.innerHTML = '.btn-21 {<br> cursor: pointer;<br> letter-spacing: 2px;<br> text-transform: uppercase;<br> font-family: Marvel;<br> font-size: 20pt;<br> width: 200px;<br> height: 45px;<br> position: relative;<br> color: #777;<br> z-index: 1;<br> transition: all 0.5s ease-in-out;<br> border-radius: 0px;<br> background: transparent;<br> padding: 0;<br> overflow: hidden;<br> border: none;<br>}<br><br>.btn-21:before {<br> content: "";<br> position: absolute;<br> top: 0;<br> left: 0;<br> width: 100%;<br> height: 2px;<br> background: linear-gradient(to right, transparent, #bbb);<br> animation: btn-21-right 2s linear infinite;<br> transition: 0.5s ease-in-out;<br>}<br><br>.btn-21:after {<br> content: "";<br> position: absolute;<br> top: 0;<br> right: 0;<br> width: 2px;<br> height: 100%;<br> background: linear-gradient(to bottom, transparent, #bbb);<br> animation: btn-21-bottom 2s linear infinite;<br> animation-delay: 1s;<br> transform: translateY(-100%);<br>}<br><br>.btn-21 span {<br> position: relative;<br> display: block;<br> width: 100%;<br> height: 100%;<br> padding: 4px;<br>}<br><br>.btn-21 span:after {<br> content: "";<br> position: absolute;<br> bottom: 0;<br> left: 0;<br> width: 100%;<br> height: 2px;<br> background: linear-gradient(to left, transparent, #bbb);<br> animation: btn-21-left 2s linear infinite;<br>}<br><br>.btn-21 span:before {<br> content: "";<br> position: absolute;<br> top: 0;<br> left: 0;<br> width: 2px;<br> height: 100%;<br> background: linear-gradient(to top, transparent, #bbb);<br> animation: btn-21-top 2s linear infinite;<br> animation-delay: 1s;<br> transform: translateY(-100%);<br>}<br><br>.btn-21:hover:before {<br> background: linear-gradient(to right, transparent, red);<br>}<br><br>.btn-21:hover:after {<br> background: linear-gradient(to bottom, transparent, red);<br>}<br><br>.btn-21 span:hover:before {<br> background: linear-gradient(to top, transparent, red);<br>}<br><br>.btn-21 span:hover:after {<br> background: linear-gradient(to left, transparent, red);<br>}<br><br>.btn-21:hover {<br> color: red;<br>}<br><br>.btn-21:active:before {<br> background: linear-gradient(to right, transparent, #00a7fc);<br>}<br><br>.btn-21:active:after {<br> background: linear-gradient(to bottom, transparent, #00a7fc);<br>}<br><br>.btn-21 span:active:before {<br> background: linear-gradient(to top, transparent, #00a7fc);<br>}<br><br>.btn-21 span:active:after {<br> background: linear-gradient(to left, transparent, #00a7fc);<br>}<br><br>.btn-21:active {<br> color: #00a7fc;<br>}<br><br>@keyframes btn-21-right {<br> 0% {<br> transform: translateX(-100%);<br> }<br><br> 100% {<br> transform: translateX(100%);<br> }<br><br>}<br><br>@keyframes btn-21-top {<br> 0% {<br> transform: translateY(100%);<br> }<br><br> 100% {<br> transform: translateY(-100%);<br> }<br><br>}<br><br>@keyframes btn-21-left {<br> 0% {<br> transform: translateX(100%);<br> }<br><br> 100% {<br> transform: translateX(-100%);<br> }<br><br>}<br><br>@keyframes btn-21-bottom {<br> 0% {<br> transform: translateY(-100%);<br> }<br><br> 100% {<br> transform: translateY(100%);<br> }<br><br>}';
} else if (modalId == 22) {
copyCSS.innerHTML = '.btn-22 {<br> cursor: pointer;<br> letter-spacing: 2px;<br> text-transform: uppercase;<br> font-family: Marvel;<br> font-size: 20pt;<br> width: 200px;<br> height: 45px;<br> position: relative;<br> color: #777;<br> z-index: 1;<br> transition: all 0.5s ease-in-out;<br> border-radius: 0px;<br> background: transparent;<br> padding: 0;<br> overflow: hidden;<br> border: none;<br>}<br><br>.btn-22:before {<br> content: "";<br> position: absolute;<br> bottom: 0;<br> left: 0;<br> width: 100%;<br> height: 2px;<br> background: linear-gradient(to right, transparent, #bbb);<br> animation: btn-22-right 2s linear infinite;<br> transition: 0.5s ease-in-out;<br>}<br><br>.btn-22:after {<br> content: "";<br> position: absolute;<br> top: 0;<br> left: 0;<br> width: 2px;<br> height: 100%;<br> background: linear-gradient(to bottom, transparent, #bbb);<br> animation: btn-22-bottom 2s linear infinite;<br> animation-delay: 1s;<br> transform: translateY(-100%);<br>}<br><br>.btn-22 span {<br> position: relative;<br> display: block;<br> width: 100%;<br> height: 100%;<br> padding: 4px;<br>}<br><br>.btn-22 span:after {<br> content: "";<br> position: absolute;<br> top: 0;<br> left: 0;<br> width: 100%;<br> height: 2px;<br> background: linear-gradient(to left, transparent, #bbb);<br> animation: btn-22-left 2s linear infinite;<br>}<br><br>.btn-22 span:before {<br> content: "";<br> position: absolute;<br> top: 0;<br> right: 0;<br> width: 2px;<br> height: 100%;<br> background: linear-gradient(to top, transparent, #bbb);<br> animation: btn-22-top 2s linear infinite;<br> animation-delay: 1s;<br> transform: translateY(-100%);<br>}<br><br>.btn-22:hover:before {<br> background: linear-gradient(to right, transparent, red);<br>}<br><br>.btn-22:hover:after {<br> background: linear-gradient(to bottom, transparent, red);<br>}<br><br>.btn-22 span:hover:before {<br> background: linear-gradient(to top, transparent, red);<br>}<br><br>.btn-22 span:hover:after {<br> background: linear-gradient(to left, transparent, red);<br>}<br><br>.btn-22:hover {<br> color: red;<br>}<br><br>.btn-22:active:before {<br> background: linear-gradient(to right, transparent, #00a7fc);<br>}<br><br>.btn-22:active:after {<br> background: linear-gradient(to bottom, transparent, #00a7fc);<br>}<br><br>.btn-22 span:active:before {<br> background: linear-gradient(to top, transparent, #00a7fc);<br>}<br><br>.btn-22 span:active:after {<br> background: linear-gradient(to left, transparent, #00a7fc);<br>}<br><br>.btn-22:active {<br> color: #00a7fc;<br>}<br><br>@keyframes btn-22-right {<br> 0% {<br> transform: translateX(-100%);<br> }<br><br> 100% {<br> transform: translateX(100%);<br> }<br><br>}<br><br>@keyframes btn-22-top {<br> 0% {<br> transform: translateY(100%);<br> }<br><br> 100% {<br> transform: translateY(-100%);<br> }<br><br>}<br><br>@keyframes btn-22-left {<br> 0% {<br> transform: translateX(100%);<br> }<br><br> 100% {<br> transform: translateX(-100%);<br> }<br><br>}<br><br>@keyframes btn-22-bottom {<br> 0% {<br> transform: translateY(-100%);<br> }<br><br> 100% {<br> transform: translateY(100%);<br> }<br><br>}';
} else if (modalId == 23) {
messageAnimation("My Favorite!! 😜", "#F1B139", "#333", 3);
copyCSS.innerHTML += ' overflow: hidden;<br> background-color: transparent;<br>}<br><br>.btn-23:before {<br> content: "";<br> position: absolute;<br> left: 50%;<br> top: 0;<br> height: 100%;<br> width: 0%;<br> background: red;<br> border-radius: 23px;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-23:hover:before {<br> width: 120%;<br> left: -10%;<br>}<br><br>.btn-23:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-23:active {<br> border-color: #00a7fc;<br> color: #333;<br> background-color: #00a7fc;<br>}<br><br>.btn-23:active:before {<br> background-color: #00a7fc;<br>}<br><br>.btn-23:active {<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br> color: #333;<br>}<br><br>.btn-23:active:before {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 24) {
copyCSS.innerHTML += ' background: transparent;<br> overflow: hidden;<br> background-color: red;<br>}<br><br>.btn-24:before {<br> content: "";<br> position: absolute;<br> height: 100%;<br> top: 0;<br> width: 120%;<br> left: -10%;<br> background-color: #fff; // Change background-color to your preference;<br> transition: all 0.5s ease-in-out;<br> border-radius: 23px;<br> z-index: -1;<br>}<br><br>.btn-24:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-24:hover:before {<br> width: 0%;<br> left: 50%;<br>}<br><br>.btn-24:active {<br> background-color: #00a7fc;<br> border-color: #00a7fc;<br> color: #333;<br>}<br><br>.btn-24:active:before {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 25) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-25:before {<br> content: "";<br> position: absolute;<br> left: 0;<br> top: 0;<br> width: 50%;<br> height: 0%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-25:after {<br> content: "";<br> position: absolute;<br> right: 0;<br> bottom: 0;<br> width: 50%;<br> height: 0%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-25:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-25:hover:before, .btn-25:hover:after {<br> height: 100%;<br>}<br><br>.btn-25:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-25:active:before, .btn-25:active:after {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 26) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-26:before {<br> content: "";<br> position: absolute;<br> right: 0;<br> top: 0;<br> width: 50%;<br> height: 0%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-26:after {<br> content: "";<br> position: absolute;<br> left: 0;<br> bottom: 0;<br> width: 50%;<br> height: 0%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-26:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-26:hover:before, .btn-26:hover:after {<br> height: 100%;<br>}<br><br>.btn-26:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-26:active:before, .btn-26:active:after {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 27) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-27:before {<br> content: "";<br> position: absolute;<br> top: 0;<br> left: 0;<br> width: 0%;<br> height: 50%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-27:after {<br> content: "";<br> position: absolute;<br> bottom: 0%;<br> right: 0%;<br> width: 0%;<br> height: 50%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-27:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-27:hover:before, .btn-27:hover:after {<br> width: 100%;<br>}<br><br>.btn-27:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-27:active:before, .btn-27:active:after {<br> background-color: #00a7fc;<br>}';
} else if (modalId == 28) {
copyCSS.innerHTML += ' background: transparent;<br>}<br><br>.btn-28:before {<br> content: "";<br> position: absolute;<br> bottom: 0;<br> left: 0;<br> width: 0%;<br> height: 50%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-28:after {<br> content: "";<br> position: absolute;<br> top: 0%;<br> right: 0%;<br> width: 0%;<br> height: 50%;<br> background-color: red;<br> transition: all 0.5s ease-in-out;<br> z-index: -1;<br>}<br><br>.btn-28:hover {<br> color: #f1f1f1;<br> border-color: red;<br>}<br><br>.btn-28:hover:before, .btn-28:hover:after {<br> width: 100%;<br>}<br><br>.btn-28:active {<br> color: #333;<br> border-color: #00a7fc;<br> background-color: #00a7fc;<br>}<br><br>.btn-28:active:before, .btn-28:active:after {<br> background-color: #00a7fc;<br>}';
}
copyCSS.innerHTML += "<br><br>.btn-" + modalId + ":focus {<br> outline: none<br>}";
modal.style.display = "block";
setTimeout(function() {modal.style.opacity = "1";}, 1);
document.documentElement.style.overflow = "hidden";
showHTML();
}
function closeModal() {
modal.style.opacity = "0";
setTimeout(function() {modal.style.display = "none";}, 300);
document.documentElement.style.overflow = "auto";
copyCSS.scrollTo(0, 0);
copyHTML.scrollTo(0, 0);
}
function showHTML() {
if (selected == "CSS") {
copyHTML.style.display = "block";
copyCSS.style.display = "none";
selected = "HTML";
htmlButton.style.opacity = "1";
cssButton.style.opacity = "0.5";
}
}
function showCSS() {
if (selected == "HTML") {
copyHTML.style.display = "none";
copyCSS.style.display = "block";
selected = "CSS";
cssButton.style.opacity = "1";
htmlButton.style.opacity = "0.5";
}
}
function copyText(copySelect) {
if (clicked == false) {
var copyTextareaValue;
if (copySelect == "HTML") {
copyTextareaValue = '<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Marvel">\n\n<button class="btn-' + modalId + '">\n <span>Click here</span>\n</button>';
showHTML();
} else if (copySelect == "CSS") {
copyTextareaValue = copyCSS.innerHTML;
copyTextareaValue = copyTextareaValue.replace(/<br>/g, "\n");
copyTextareaValue = copyTextareaValue.replace(/ /g, " ");
showCSS();
}
messageAnimation(copySelect + " Copied!", "red", "#f1f1f1", 2);
copyTextarea.value = copyTextareaValue;
copyTextarea.style.display = "block";
copyTextarea.select();
copyTextarea.setSelectionRange(0, 99999);
document.execCommand('copy');
copyTextarea.setSelectionRange(0, 0);
copyTextarea.blur();
copyTextarea.style.display = "none";
}
}
function messageAnimation(messageText, backgroundColor, color, duration) {
clicked = true;
copyMessage.innerHTML = messageText;
copyMessage.style.left = "40px";
copyMessage.style.opacity = "1";
copyMessage.style.backgroundColor = backgroundColor;
copyMessage.style.color = color;
setTimeout(function() {copyMessage.style.left = "10px"}, 300);
setTimeout(function() {copyMessage.style.bottom = "100px"; copyMessage.style.opacity = "0"}, duration * 1000);
setTimeout(function() {copyMessage.style.left = "-250px"; copyMessage.style.bottom = "10px"; clicked = false;}, duration * 1000 + 300);
}
function onLoad() {
var width = window.innerWidth;
var height = window.innerHeight;
modalBox.style.width = width - 200 + "px";
modalBox.style.height = height - 100 + "px";
content[0].style.width = width - 220 + "px";
content[0].style.height = height - 210 + "px";
content[1].style.width = width - 220 + "px";
content[1].style.height = height - 210 + "px";
copyButton.style.left = (width - 425) / 2 + "px";
}
function onResize() {
var width = window.innerWidth;
var height = window.innerHeight;
modalBox.style.width = width - 200 + "px";
modalBox.style.height = height - 100 + "px";
content[0].style.width = width - 220 + "px";
content[0].style.height = height - 210 + "px";
content[1].style.width = width - 220 + "px";
content[1].style.height = height - 210 + "px";
copyButton.style.left = (width - 445) / 2 + "px"
}
Also see: Tab Triggers