IFCD0210/Practicas/Practicas HTML/Formularios/Practica 4/css/style.css
Marcos Lopez 5ceebea03a Dia 21
2023-12-21 13:25:53 +01:00

155 lines
3.0 KiB
CSS

@charset "UTF-8";
* {
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
border: none;
outline: none;
}
/*Para evitar los estilos de los autocompletados de los Inputs, pero no va muy bien con el fondo transparente de los mismos*/
/* input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
box-shadow: 0 0 0 1000px rgba(0, 0, 0, 1) inset !important;
-webkit-text-fill-color: white ;
} */
html {
height: 100%;
}
body {
font-family: "Roboto", sans-serif;
padding: 0 0.5em;
background-image: url("../img/fondo_taller.jpg");
background-size: cover;
background-position: center;
background-attachment: fixed;
height: 100%;
}
/* estilos para contenedores de elementos del formularios */
.form_citas {
margin: auto;
padding: 2em 0 4em;
max-width: 650px;
display: flex;
flex-direction: column;
gap: 2em;
}
.form_title {
background-color: rgba(0, 0, 0, 0.6);
border: 2px solid #144b9e;
box-sizing: border-box;
border-radius: 0.5em;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 1); /* offsetX, offsetY, blurRadius, color */
padding: 0.2em 0;
text-align: center;
color: #ffcb00;
}
.form_main {
background-color: rgba(0, 0, 0, 0.6);
border: 2px solid #144b9e;
box-sizing: border-box;
border-radius: 0.5em;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 1); /* offsetX, offsetY, blurRadius, color */
padding: 0.3em;
color: #ffcb00;
display: flex;
flex-direction: column;
gap: 0.5em;
}
.form_main > fieldset {
border: 2px solid #144b9e;
box-sizing: border-box;
border-radius: 0.5em;
box-shadow: 10px;
padding: 0.5em;
display: flex;
flex-direction: column;
gap: 0.6em;
}
.flex_responsive {
display: flex;
flex-direction: row;
gap: 0.5em;
align-items: center;
}
/* Estilos para aplicar a elementos directamente*/
.form_main > fieldset legend {
margin-left: 1em;
padding: 0 0.2em;
font-weight: bold;
}
label {
display: inline-block;
font-weight: 400;
color: white;
width: 6em;
}
input {
padding: 0.2em;
flex-grow: 1;
font-size: large;
background-color: transparent;
border: 1px solid white;
border-radius: 0.2em;
color: white;
}
input:hover,
input:focus {
background-color: rgba(0, 0, 0, 0.4);
}
.btn {
border: 2px solid #144b9e;
box-sizing: border-box;
}
.btn:hover {
background-color: #144b9e;
}
input:invalid,
select:invalid,
textarea:invalid {
/* Estilos para elementos inválidos */
border: 2px solid red; /* Por ejemplo, un borde rojo para resaltar */
background-color: #ffcccc; /* Un fondo de color claro */
color: black;
}
input:invalid ~ .verificado{
display: none;
}
input:valid ~ .verificado{
display: inline;
}
input:invalid ~ .erroneo{
display: inline;
}
input:valid ~ .erroneo{
display: none;
}
/* Media Queries */
@media (max-width: 550px) {
body {
background-image: url("../img/fondo_vertical_taller.jpg");
}
.flex_responsive {
display: flex;
align-items: normal;
flex-direction: column;
}
}