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.
<!---ESTO ACTIVA EL NUEVO ESTILO, SE PUEDE BORRAR--->
<input id="oldui" type="checkbox" />
<label class="ctrl" for="oldui">activar estilo nuevo</label>
<!---=================================
MAQUETADO ORIGINAL DEL LOGGIN DE SAMCW
======================================--->
<body bgcolor="D1D2E6">
<br>
<br>
<br>
<br>
<br>
<table border="1" align="center">
<tbody>
<tr>
<td><img src="http://i65.tinypic.com/9pxemb.png"></td>
</tr>
<form name="acceso" action="procesar_acceso.php" method="post"></form>
<tr>
<td>
<center>
<table class="tabla" border="1">
<tbody>
<tr>
<td>
<center><img src="http://i68.tinypic.com/2pre9dy.jpg"></center>
</td>
<td>
<center><img src="http://i66.tinypic.com/2rhwmew.png"></center>
</td>
</tr>
<tr>
<td>
<input name="usua" type="text" size="20" maxlength="20">
</td>
<td>
<input name="clav" type="password" size="20" maxlength="20">
</td>
</tr>
</tbody>
</table>
</center>
</td>
</tr>
<tr>
<td>
<center>
<input type="button" value=" > " onclick="acceso.submit()">
</center>
</td>
</tr>
<tr>
<td>
<a href="http://advance.tk"><img src="http://i68.tinypic.com/98bjtk.png"></a>
</td>
</tr>
</tbody>
</table>
</body>
@import url(https://fonts.googleapis.com/css?family=Exo:700,700italic,900,900italic);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,300,400italic,700italic);
*{box-sizing: border-box; transition: all ease .3s;}
#oldui:checked ~ br{display: none;}
html, body
{
padding: 0;
margin: 0;
font-size: 16px;
background-color: rgba(214,211,230,1);
min-height: 100vh;
position: relative;
text-align: center;
color: rgba(0,0,0,.75);
font-weight: 400;
z-index: -2;
}
table{ background-color: #fff; }
[type="button"] {
background-color: #0000e4;
margin: 10px;
font-size: large;
font-weight: bold;
cursor: pointer;
border-radius: 5px;
border: solid 1px #000;
color: #FFF;}
[type="button"]:hover {
background-color: #FFF;
color: #000;
}
/*agragan la imagen de fondo y el color*/
body::before,
body::after
{
content:'';
width: 100%;
height: 100%;
top: 0;
left: 0;
display: block;
position: absolute;
z-index: -1;
background-color: rgba(214,211,230,.5);
}
/*imagen de fondo*/
body::after
{
background-image: url("../imagenes/login-bkg.png");/*esta es la ruta*/
background-image: url("http://i68.tinypic.com/2rwnrle.png");
background-size: cover;
background-repeat: no-repeat;
z-index: -2;
}
/*tabla loggin*/
#oldui:checked ~ table
{
position: relative;
z-index: 2;
background-color: #fff;
background-color: rgba(255,255,255,.7);
border: none;
min-height: 100vh;
width: 100%;
max-width: 400px;
cell-spacing: 0;
border-spacing: none;
border-collapse: collapse;
font-family: "open sans", Arial, Helvetica, sans-serif;
color: gray;
text-align: center;
}
/*quitar blanco de fondo en tabla interna*/
#oldui:checked ~ table .tabla
{
background: none;
}
/*elimina los bordes*/
#oldui:checked ~ table td
{
border: none;
}
/*titulo logo tabla login*/
#oldui:checked ~ table>tbody>tr:first-child td
{
position: relative;
vertical-align: bottom;
font-family: "exo", georgia, serif;
height: 300px;
height: 30vh;
font-size: 2em;
font-weight: 900;
color: rgba(12,13,82,1);
padding: .5em 0;
}
/*logo unicamente con tipografía*/
#oldui:checked ~ table>tbody>tr:first-child td::before
{
content: 'SAMCW';
}
/*linea blanca debajo del logo*/
#oldui:checked ~ table>tbody>tr:first-child td::after
{
content: '';
display: block;
position: absolute;
width: 80%;
height: 2px;
background-color: #fff;
bottom: 0;
left: 10%;
}
/*pie de pagina tabla login*/
#oldui:checked ~ table>tbody>tr:last-child td
{
vertical-align: middle;
height: 50px;
height: 7vh;
font-size: 1em;
font-weight: 400;
background-color: rgba(12,13,82,1);
color: #fff;
position: relative;
}
/*pie de pagina creditos tabla loggin*/
#oldui:checked ~ table>tbody>tr:last-child td a::before
{
content:'www.advance.tk';
}
#oldui:checked ~ table>tbody>tr:last-child td a
{
color: #fff;
text-decoration: none;
}
#oldui:checked ~ table>tbody>tr:nth-child(4) td
{
height: 30vh;
vertical-align: top;
padding: 1em;
}
/*imagenes usadas en las tablas*/
#oldui:checked ~ table img
{
position: absolute;
display: none;
}
/*estilos al input button*/
#oldui:checked ~ table [type="button"],
.ctrl
{
font-size: 0.9em;
padding: 1em 1.5em;
background-color: rgba(35,35,207,1);
border: none;
border-radius: 50px;
color: rgb(255, 255, 255);
box-shadow:
inset 0 -1em 1em rgba(27,31,148,1),
inset 0 -6em 0em rgba(35,35,207,1),
inset 0 0em 0em rgba(60,60,230,1),
0 .2em 0 0 rgba(12,13,82,1);
}
/*estilos al input button en estados hover y focus*/
#oldui:checked ~ table [type="button"]:hover,
#oldui:checked ~ table [type="button"]:focus
{
transform: translateY(-0.2em);
box-shadow:
inset 0 -1em 1em rgba(27,31,130,1),
inset 0 -2em 1em rgba(35,35,207,1),
inset 0 -3em 1em rgba(60,60,230,1),
0 .4em 0 0 rgba(12,13,82,1);
outline: none;
}
/*estilos al input button al click*/
#oldui:checked ~ table [type="button"]:active
{
box-shadow: none;
transform: initial;
}
/*login tabla interna*/
#oldui:checked ~ table .tabla
{
border: none;
width: 80%;
}
/*login tabla interna y sus input*/
#oldui:checked ~ table .tabla input
{
font-size: 1.2em;
border: none;
width: 100%;
padding: 0.8em 1.5em;
background: rgba(255,255,255,1);
color: rgba(35,35,207,1);
min-height: 1.5rem;
}
#oldui:checked ~ table .tabla input:focus
{
outline: none;
box-shadow: inset 2px 2px 1em 0 rgba(35,35,207,.15);
}
/*login tabla interna y sus celdas*/
#oldui:checked ~ table .tabla td
{
padding: 4vh 0 0;
display: block;
overflow: hidden;
position: relative;
}
/*textos para inputs*/
#oldui:checked ~ table .tabla tr:last-child td::before
{
font-size: 0.8rem;
display: block;
position: absolute;
pointer-events: none;
text-align: left;
padding: 0.3em 0.8em;
color: gray;
top: 5px;
color: rgba(28,28,187,.5);
animation: sube ease 1s backwards;
}
#oldui:checked ~ table .tabla tr:last-child td:nth-child(1)::before
{
content: 'usuario';
}
#oldui:checked ~ table .tabla tr:last-child td:nth-child(2)::before
{
content: 'contraseña';
}
/*hack webkit para diligenciado automatico*/
#oldui:checked ~ table .tabla input:-webkit-autofill
{
background: red;
}
/*iconos de usuario y contraseña*/
#oldui:checked ~ table .tabla tr:last-child td::after
{
content: '';
display: block;
position: absolute;
right: -0.5rem;
bottom: -0.5rem;
font-family: "FontAwesome";
color: #0C0D52;
pointer-events: none;
width: 100%;
text-align: right;
animation: icono ease 1s backwards;
}
/*iconos inputs*/
#oldui:checked ~ table .tabla tr:last-child td:hover::after
{
color: #1C56CD;
}
/*icono de usuario*/
#oldui:checked ~ table .tabla tr:last-child td:nth-child(1)::after
{
right: -0.3rem;
font-size: 4.5em;
content: '\f007';
}
/*icono de contraseña*/
#oldui:checked ~ table .tabla tr:last-child td:nth-child(2)::after
{
font-size: 4.3em;
content: '\f084';
}
/*oculta las celdas de usuario y contraseña*/
#oldui:checked ~ table .tabla tr:first-child
{
display: none;
}
/*======================================
ESTOS ESTILOS SON NECESARIOS SON PARA
HACER FUNCIONAR EL BOTON SIN JS
========================================
Controlador css para cambiar los estilos
*/
.ctrl, #oldui
{
position: absolute;
}
.ctrl::selection
{
background-color: #ABC700;
}
.ctrl
{
background-color: #ABC700;
display: block;
padding: 1em 2em;
bottom: 5%;
left: 50%;
transform: translateX(-50%);
z-index: 10;
cursor: pointer;
font-family: "open sans", Arial, Helvetica, sans-serif;
}
.ctrl:hover
{
box-shadow:
inset 0 3em 0 0 #ABC700;
transition: all ease 1s;
}
.ctrl:active
{
transform:
translateX(-50%)
translateY(20px);
}
#oldui
{
top: 0;
left: 0;
opacity: 0;
}
#oldui:checked ~ .ctrl
{
bottom: calc(100% - 4.5em);
left: 1em;
transform: translateX(0)
}
#oldui:checked ~ .ctrl::before
{
content: 'des';
}
#oldui:checked ~ .ctrl:active
{
transform:
translateY(20px);
}
@keyframes icono
{
0%{
right: 100%;
}
70%{
right: -20%;
}
}
@keyframes sube
{
0%{
transform: translateY(100%);
opacity: 0;
}
100%{
transform: translateY(0);
opacity: 1;
}
}
Also see: Tab Triggers