0% found this document useful (0 votes)
3 views

practica de css

The document contains a comprehensive set of CSS styles for various HTML elements, including links, spans, strong and emphasized text, form inputs, and tables. It defines styles for different states such as focus, hover, and checked, as well as layout properties for boxes, grids, and tables. Additionally, it includes specific styles for warnings and errors in forms, as well as typography settings.

Uploaded by

avionetazaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

practica de css

The document contains a comprehensive set of CSS styles for various HTML elements, including links, spans, strong and emphasized text, form inputs, and tables. It defines styles for different states such as focus, hover, and checked, as well as layout properties for boxes, grids, and tables. Additionally, it includes specific styles for warnings and errors in forms, as well as typography settings.

Uploaded by

avionetazaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 10

a:link {

background-color: gold;
color: green;
}
span {
background-color: yellow;
}
strong {
color: rebeccapurple;
}
em {
color: rebeccapurple;
}
* {
margin: 0;
}
.highlight {
background-color: lime;
}
strong.highlight {
background-color: gray;
}
span.highlight {
background-color: darkviolet;
}
.notebox {
font-size: 125%;
border: 4px solid #666;
padding: 5em;
background-color: blue;
color: yellow;
}
.notebox.warning {
border-color: orange;
font-weight: bold;
background-color: blueviolet;
color: skyblue;
}
.notebox.danger {
border-color: red;
font-weight: bold;
background-color: aqua;
color: green;
}
#one {
background-color: yellow;
}
h1#heading {
color: rebeccapurple;
}
li[class] {
font-size: 200%;
}
li[class = "a"] {
background-color: yellow;
}
li[class ~= "a"] {
color: red;
}
li[class ^= "a"] {
font-size: 200%;
}
li[class $= "a"] {
background-color: yellow;
}
li[class *= "a"] {
color: red;
}*/
li[class ^= "a"] {
background-color: yellow;
}
li[class ^= "a" i] {
color: red;
}
article p:first-child {
font-size: 120%;
font-weight: bold;
}
.red-input:focus {
background: yellow;
color: red;
}
.blue-input:focus {
background:yellow;
color: blue;
}
article p:first-child::first-line {
font-size: 140%;
font-weight: bold;
}
.box::before {
content: "This should show before the other content.";
}
.box-2::after {
content:
url("https://cdn.icon-icons.com/icons2/3389/PNG/512/arrow_small_right_icon_213184.p
ng");
}
.box-3::before {
content: "";
display: block;
width: 100px;
height: 100px;
background-color: rebeccapurple;
border: 1px solid black;
}
a:any-link {
font-size: 130%;
border: 1px solid blue;
color: orange;
}
a:-webkit-any-link {
border: 2px solid orange;
color: blue;
}
.active:active {
background-color: lightgreen;
}
div,
select {
margin: 8px;
}
/*Etiquetas para entradas marcadas*/
input:checked + label {
color:red;
}
/*Elemento radio, cuando está marcado*/
input[type = "radio"]:checked {
box-shadow: 0 0 0 3px orange;
}

/*Elemento Checkbox, cuando está marcado*/


input[type = "checkbox"]:checked {
box-shadow: 0 0 0 3px hotpink;
}

/*Elementos option, cuando se seleccionan*/


option:checked {
box-shadow: 0 0 0 3px lime;
color: green;
}
/*Hide the toggle checkbox*/
#expand-toggle {
display: none;
}

/*hide expandable content by default*/


.expandable {
visibility: collapse;
background: #ddd;
}

/*style the button*/


#expand-btn {
display: inline-block;
margin-top: 12px;
padding: 5px 11px;
background-color: #ff7;
border: 1px solid blue;
border-radius: 3px;
}
/*Show hidden content when the checkbox is checked*/
#expand-toggle:checked ~ * .expandable {
visibility: visible;
}
/*Style the button when the checkbox is checked*/
#expand-toggle:checked ~ #expand-btn {
background-color: #ccc;
}
:current(p, span) {
background-color: yellow;
}
input:default {
box-shadow: 0 0 2px 1px coral;
}
input:default + label {
color: coral;
}
.box-10 {
background: pink;
height: 80%;
width: 80%;
}
.box-10:empty {
background: lime;
}
input:enabled {
color: #2b2;
}
.input:disabled {
color: #aaa;
}
/*p:first-child {
color: lime;
background-color: black;
padding: 5px;
}*/
ul li {
color: blue;
}
ul li:first-child {
color: red;
font-weight: bold;
}
.red-input:focus {
background-color: yellow;
color: red;
}
.blue-input:focus {
background-color: yellow;
color: blue;
}
input,
button {
margin: 10px;
}
.focus-only:focus{
outline: 2px solid black;
}
.focus-visible-only:focus-visible {
outline: 4px dashed darkorange;
}
/*custom-button {
display: inline-block;
margin: 10px;
}
custom-butoon:focus {
/*provide a fallback style for browsers
that don't spport :focus-visible
outline: none;
background: lightgrey;
}
/*custom-button:focus:not(:focus-visisble) {
remove the focus indicator on mouse-focus for browsers
that do support :focus-visible
background: transparent;
}*/
custom-button:focus-visible {
/*Draw a very noticeable focus style for
keyboard-focus on browsers that do support
:focus-visible*/
outline: 4px dashed darkorange;
background: transparent;
}
form {
border: 1px solid;
color: gray;
padding: 4px;
}
form:focus-within {
background: #ff8;
color: balck;
}
input {
margin: 4px;
}
a.test-for-hover:hover {
background-color: gold;
}
li.in-range {
list-style: none;
margin-bottom: 1em;
}
input {
border: 1px solid black;
}
input:in-range {
background-color: rgba(0, 255, 0, 0.5);
}
input:out-of-range {
background-color: rgba(255, 0, 0, 0.5);
border: 2px solid red;
}
input:in-range + label::after {
content: "well.";
}
input:out-of-range + label::after {
content: "out of range!";
}
input:invalid {
background-color: #ffdddd;
}
form:invalid {
border: 5px solid #ffdddd;
}
input:invalid {
background-color: #ddffdd;
}
form:valid {
border:5px solid #ddffdd;
}
input:required {
border-color: #800000;
border-width: 3px;
}
input:required:invalid {
border-color: #c00000;
}
p:last-child {
color: fuchsia;
background-color: black;
padding: 5px;
}
ul li {
color: blue;
}
ul li:last-child {
border: 1 px solid red;
color: red;
}
p:last-of-type {
color: red;
font-style: italic;
}
article :last-of-type {
background-color: pink;
}
@page :left{
margin: 2in 3in;
}
.fancy {
text-shadow: 2px 2px 3px gold;
}
/*elements <p> that are not in the class '.fancy'
p:not(.fancy) {
color: green;
}
/*elements that are not elements <p>
body:not(p) {
text-decoration: underline;
}
/*Elements that are not elements <div> or <span>
body:not(div):not(span) {
font-weight: bold;
}
/*Elements that are not 'crazy' or '.fancy'
/*Note that this syntax stukk are not well supported
body:not(.crazy, .fancy) {
font-family: sans-serif;
}*/
html {
font-family:sans-serif;
}
span,
div em {
padding: 5px;
border: 1px solid green;
display: inline-block;
margin-bottom: 3px;
}
.first span:nth-child(2n + 1),
.second span:nth-child(2n + 1),
.third span:nth-of-type(2n + 1) {
background-color: lime;
}
/*Odd paragraph*/
p:nth-of-type(2n + 1) {
color: red;
}
/*Peers paragraph*/
p:nth-of-type(2n) {
color: blue;
}
/*First paragraph*/
p:nth-of-type(1) {
font-weight: bold;
}
/*:only-type*/
main :only-of-type {
color: orange;
}
.placeholdertest {
border: 2px solid black;
padding: 3px;
}
.placeholdertest:placeholder-shown {
border-color: silver;
}
.textoverflow:placeholder-shown {
text-overflow: ellipsis;*/
}
/*.des-box p {
color: yellow;
}
ul > li {
border-top: 15px solid red;
}
h1 + p {
font-weight: bold;
background-color: #333;
color: #fff;
padding: 5em;
}
h1 ~ p {
font-weight: bold;
background-color: #624;
color: #783292;
padding: 5em;
}*/
.horizontal-text {
border: 2px solid green;
width: 40%;
}

.box {
height: 150px;
width: 200px;
border-style: dotted;
border-color: yellow;
}
.box2 {
border: 5px solid darkgreen;
height: 150px;
width: 200px;
font-size: 150%;
}
.box3 {
border: 5px solid darkred;
width: 300px;
margin: 10%;
padding: 10%;
}
.box4 {
border: 5px solid lightgreen;
min-height: 150px;
width: 200px;
font-size: 150%;
}
.box5 {
width: 200px;
}
.minibox {
width: 50px;
}
.width {
width: 100%;
}
.max {
max-width: 100%;
}
.box6 {
border: 5px solid yellow;
width: 20vw;
height: 20vh;
font-size: 10vh;
}
.box7 {
width: 200px;
}
/*img {
border: 5px solid darkblue;
max-width: 100%;
}*/
.box8 {
width: 200px;
height: 200px;
}
/*img {
border: 5px solid goldenrod;
height: 100%;
width: 100%;
}*/
.cover {
object-fit: cover;
}
.contain {
object-fit: contain;
}
.wrapper6 {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 200px 200px;
gap: 20px;
}
.wrapper6 > div {
background-color: rebeccapurple;
border-radius: .5em;
}
input [type = "text"],
input [type = "email"] {
border: 2px solid #000;
margin: 0 0 1em 0;
padding: 10px;
width: 100%;
}
input [type = "submit"] {
border: 3px solid #333;
background-color: #999;
border-radius: 5px;
padding: 10px 2em;
font-weight: bold;
color: #fff;
}
input [type = "submit"]:hover,
input [type = "submit"]:focus {
background-color: #333;
}

table {
table-layout: fixed;
width: 100%;
border-collapse: collapse;
border: 3px solid purple;
}

thead th:nth-child(1) {
width: 30%;
}

thead th:nth-child(2) {
width: 20%;
}

thead th:nth-child(3) {
width: 15%;
}

thead th:nth-child(4) {
width: 35%;
}

th,
td {
padding: 20px;
}

/* typography */

html {
font-family: "helvetica neue", helvetica, arial, sans-serif;
}
thead th,
tfoot th {
font-family: "Rock Salt", cursive;
}

th {
letter-spacing: 2px;
}

td {
letter-spacing: 1px;
}

tbody td {
text-align: center;
}

tfoot th {
text-align: right;
}
thead,
tfoot {
background: url(leopardskin.jpg);
color: white;
text-shadow: 1px 1px 1px black;
}
thead th,
tfoot th,
tfoot td {
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0.1),
rgba(0, 0, 0, 0.5)
);
border: 3px solid purple;
}
tbody tr:nth-child(odd) {
background-color: #ff33cc;
}

tbody tr:nth-child(even) {
background-color: #e495e4;
}
tbody tr {
background-image: url(noise.png);
}
table {
background-color: #ff33cc;
}
caption {
font-family: "Rock-salt", cursive;
padding: 20px;
font-style: italic;
caption-side: bottom;
color: #666;
text-align: right;
letter-spacing: 1px;
}

You might also like