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 esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM 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.
<div id="div_1">
<a href="#" class="shiny_button" id="A_2">Shiny Button</a>
</div>
http://divicio.us/effects/add-shiny-hover-effect-to-divi-button/#
#div_1 {
background-color: #012839;
text-align: center;
}
.shiny_button {
bottom: 0px;
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;
box-sizing: border-box;
color: rgb(0, 199, 236);
display: inline-block;
height: 119px;
left: 0px;
overflow-wrap: break-word;
position: relative;
right: 0px;
text-align: center;
text-decoration: none solid rgb(0, 199, 236);
top: 0px;
/*width: 402.938px;*/
word-wrap: break-word;
column-rule-color: rgb(0, 199, 236);
-webkit-font-smoothing: antialiased;
-webkit-locale: "en-US";
perspective-origin: 201.469px 59.5px;
-webkit-text-decorations-in-effect: none;
-webkit-text-emphasis-color: rgb(0, 199, 236);
transform-origin: 201.469px 59.5px;
caret-color: rgb(0, 199, 236);
border: 2px solid rgb(0, 199, 236);
border-radius: 5px 5px 5px 5px;
font: normal normal 500 normal 50px / 85px "Open Sans", Arial, sans-serif;
margin: 100px 0px;
outline: rgb(0, 199, 236) none 0px;
overflow: hidden;
padding: 15px 50px;
transition: all 0.2s ease-in 0s;
-webkit-border-after: 2px solid rgb(0, 199, 236);
-webkit-border-before: 2px solid rgb(0, 199, 236);
-webkit-border-end: 2px solid rgb(0, 199, 236);
-webkit-border-start: 2px solid rgb(0, 199, 236);
-webkit-transition: all 0.2s ease-in 0s;
-webkit-transform-origin: 201.469px 59.5px;
}/*#A_2*/
.shiny_button:before {
bottom: 8.0625px;
box-shadow: rgb(255, 255, 255) 0px 0px 60px 20px;
color: rgb(0, 199, 236);
content: '""';
display: block;
height: 98.8906px;
left: 0px;
opacity: 0;
overflow-wrap: break-word;
position: absolute;
right: 430.938px;
text-align: center;
text-decoration: none solid rgb(0, 199, 236);
top: 8.04688px;
width: 0px;
word-wrap: break-word;
column-rule-color: rgb(0, 199, 236);
-webkit-font-smoothing: antialiased;
-webkit-locale: "en-US";
perspective-origin: 0px 49.4375px;
-webkit-text-decorations-in-effect: none;
-webkit-text-emphasis-color: rgb(0, 199, 236);
-webkit-text-fill-color: rgb(0, 199, 236);
-webkit-text-stroke-color: rgb(0, 199, 236);
transform: matrix(1, 0, -0.36397, 1, 0, 0);
transform-origin: 0px 49.4375px;
caret-color: rgb(0, 199, 236);
background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box;
border: 0px none rgb(0, 199, 236);
font: normal normal 500 normal 32px / 32px "Open Sans", Arial, sans-serif;
margin: 0px 0px 0px -32px;
outline: rgb(0, 199, 236) none 0px;
transition: all 0.2s ease 0s;
-webkit-border-after: 0px none rgb(0, 199, 236);
-webkit-border-before: 0px none rgb(0, 199, 236);
-webkit-border-end: 0px none rgb(0, 199, 236);
-webkit-border-start: 0px none rgb(0, 199, 236);
-webkit-transition: all 0.2s ease 0s;
-webkit-transform-origin: 0px 49.4375px;
}/*#A_2:before*/
/* Start shiny hover effect*/
.shiny_button {
overflow: hidden;
box-shadow: 0 0 0 0 transparent;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}
.shiny_button:hover {
box-shadow: 0 0 30px 5px rgba(0, 199, 236, 0.5); /* set your color here
(it should be the same as the button bg color on hover but with 0.5 opacity)
and play with 30px and 5px values to adjust box-shadow */
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
}
.shiny_button:hover:before {
-webkit-animation: shine 0.5s 0s linear;
-moz-animation: shine 0.5s 0s linear;
animation: shine 0.5s 0s linear;
}
.shiny_button:active {
box-shadow: 0 0 0 0 transparent;
-webkit-transition: box-shadow 0.2s ease-in;
-moz-transition: box-shadow 0.2s ease-in;
transition: box-shadow 0.2s ease-in;
}
.shiny_button:before {
content: '';
display: block;
width: 0px;
height: 86%;
position: absolute;
top: 7%;
left: 0%;
opacity: 0;
background: #ffffff;
box-shadow: 0 0 60px 20px #ffffff; /*play with 60px and 20px values to adjust box-shadow*/
-webkit-transform: skewX(-20deg);
-moz-transform: skewX(-20deg);
-ms-transform: skewX(-20deg);
-o-transform: skewX(-20deg);
transform: skewX(-20deg);
}
.shiny_button:after {
line-height: inherit !important;
}
@-webkit-keyframes shine {
from {
opacity: 0;
left: 0%;
}
50% {
opacity: 1;
}
to {
opacity: 0;
left: 100%;
}
}
@-moz-keyframes shine {
from {
opacity: 0;
left: 0%;
}
50% {
opacity: 1;
}
to {
opacity: 0;
left: 100%;
}
}
@keyframes shine {
from {
opacity: 0;
left: 0%;
}
50% {
opacity: 1;
}
to {
opacity: 0;
left: 100%;
}
}
.shiny_button::before,.shiny_button::after {
position: absolute;
margin-left: -1em;
opacity: 0;
font-size:50px;
line-height: 1em;
content: "";
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
transition: all 0.2s;
}
/* End shiny hover effect*/
.shiny_button::after {
line-height: inherit !important;
}
.shiny_button::after {
font-family:"Ionicons" !important;
font-weight: normal;
font-style: normal;
font-variant: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1;
text-transform: none;
speak: none;
}
.shiny_button:hover {
color: #ffffff !important;
background: #00c7ec !important;
border-radius: 5px;
letter-spacing: 0px;
padding-left: 0.7em;
padding-right: 2em;
}
.shiny_button:hover {
box-shadow: 0 0 30px 5px rgba(0, 199, 236, 0.5);
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
}
.shiny_button:active {
box-shadow: 0 0 0 0 transparent;
-webkit-transition: box-shadow 0.2s ease-in;
-moz-transition: box-shadow 0.2s ease-in;
transition: box-shadow 0.2s ease-in;
}
.shiny_button::after {
font-size:50px;
color: #ffffff;
opacity: 0;
display: inline-block;
}
.shiny_button:hover::after {
opacity: 1;
}
.shiny_button:hover::after {
margin-left: 10px;
opacity: 1;
}
.shiny_button:hover {
color: #ffffff !important;
letter-spacing: 0px;
}
.shiny_button:hover::after {
opacity: 1;
}
.shiny_button:after {
bottom: 15px;
color: rgb(255, 255, 255);
/*content: '>';*/
content: "\f125";
display: inline-block;
height: 85px;
/* left: 348.922px;*/
opacity: 0;
overflow-wrap: break-word;
position:absolute;
speak: none;
text-align: center;
text-decoration: none solid rgb(255, 255, 255);
top: 15px;
width: 80px;
word-wrap: break-word;
column-rule-color: rgb(255, 255, 255);
-webkit-font-smoothing: antialiased;
-webkit-locale: "en-US";
perspective-origin: 40px 42.5px;
-webkit-text-decorations-in-effect: none;
-webkit-text-emphasis-color: rgb(255, 255, 255);
-webkit-text-fill-color: rgb(255, 255, 255);
-webkit-text-stroke-color: rgb(255, 255, 255);
transform-origin: 40px 42.5px;
caret-color: rgb(255, 255, 255);
border: 0px none rgb(255, 255, 255);
/*font: normal normal normal normal 80px / 85px Ionicons;*/
margin-left:-10em;
outline: rgb(255, 255, 255) none 0px;
transition: all 0.2s ease 0s;
-webkit-border-after: 0px none rgb(255, 255, 255);
-webkit-border-before: 0px none rgb(255, 255, 255);
-webkit-border-end: 0px none rgb(255, 255, 255);
-webkit-border-start: 0px none rgb(255, 255, 255);
-webkit-transition: all 0.2s ease 0s;
-webkit-transform-origin: 40px 42.5px;
}/*#A_2:after*/
Also see: Tab Triggers