* { } /* Universal Selector */
h1 { } /* Type Selector */
.class { } /* Class Selector */
#id { } /* ID Selector */
[attribute] { } /* Attribute Selector */
div p { } /* Descendant Selector */
div > p { } /* Child Selector */
div + p { } /* Adjacent Sibling Selector */
div ~ p { } /* General Sibling Selector */
a:hover { } /* Hover */
input:focus { } /* Focus */
li:first-child { } /* First Child */
li:last-child { } /* Last Child */
li:nth-child(2n) { } /* Even Children */
p::first-line { } /* First Line */
p::first-letter { } /* First Letter */
p::before { content: ""; } /* Before Element */
p::after { content: ""; } /* After Element */
* {
box-sizing: border-box;
}
.element {
margin: 10px; /* All sides */
margin: 10px 20px; /* Top/Bottom Left/Right */
margin: 10px 20px 30px 40px; /* Top Right Bottom Left */
padding: 10px; /* Same patterns as margin */
}
.element {
border: 1px solid black;
border-radius: 5px;
border-top: 2px dashed red;
}
body {
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: bold;
font-style: italic;
line-height: 1.5;
}
p {
text-align: center;
text-decoration: underline;
text-transform: uppercase;
letter-spacing: 2px;
word-spacing: 4px;
}
.element {
color: red;
color: #00ff00;
color: rgb(0, 0, 255);
color: rgba(0, 0, 255, 0.5);
color: hsl(120, 100%, 50%);
color: hsla(120, 100%, 50%, 0.5);
}
.element {
background-color: yellow;
background-image: url('image.jpg');
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.element {
display: block;
display: inline;
display: inline-block;
display: none;
}
.element {
position: static;
position: relative;
position: absolute;
position: fixed;
position: sticky;
top: 0;
left: 0;
z-index: 1;
}
.element {
float: left;
float: right;
clear: both;
}
.container {
display: flex;
flex-direction: row | column;
justify-content: flex-start | center | flex-end | space-between | space-around;
align-items: stretch | flex-start | center | flex-end;
flex-wrap: nowrap | wrap;
}
.item {
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
flex: 1; /* shorthand for grow, shrink, and basis */
align-self: auto | flex-start | center | flex-end | stretch;
}
.container {
display: grid;
grid-template-columns: 100px 100px 100px;
grid-template-rows: 100px 100px;
gap: 10px;
justify-items: start | center | end;
align-items: start | center | end;
}
.item {
grid-column: 1 / 3;
grid-row: 1 / 2;
justify-self: start | center | end;
align-self: start | center | end;
}
.element {
transition: property duration timing-function delay;
transition: all 0.3s ease;
}
@keyframes slide {
0% { left: 0; }
100% { left: 100px; }
}
.element {
animation: slide 2s ease infinite;
}
@media screen and (max-width: 600px) {
body {
font-size: 14px;
}
}
img {
max-width: 100%;
height: auto;
}
<meta name="viewport" content="width=device-width, initial-scale=1">
:root {
--main-color: #3498db;
}
.element {
color: var(--main-color);
}
.element {
opacity: 0.5;
visibility: hidden;
}
.element {
transform: translate(50px, 100px) rotate(45deg) scale(1.5);
}
.element {
filter: blur(5px) brightness(200%) grayscale(80%);
}
2024 © All rights reserved - buraxta.com