Escolar Documentos
Profissional Documentos
Cultura Documentos
/*para colocar a scroll bar em um elemento pai para conseguir ler o elemento filho,
colocar overflow: auto. Ou colocar overflow: scroll; Overflow pode ser definido
individualmente*/
/*O position absolute é posicionado com base no documento, e não na visão da tela*/
-- the display: inline-block; will maintain every item in the .item div in the same
line,
unless the space is too short, than part of it goes down one "line", but still gets
centered
-- setting the left-right .item margin the same will make the elements stay on the
center
even when they are alone
---- (>> = less space) 3 same line >> 2 same line, 1 different line >> 3 different
line
*/
/*The hover propertie allows us to set: when this action happens, do this to the
determined
class:
.square1:hover{
background-color: rgb(0, 0, 0);
transition: 0.5s;
}
.square1:hover ~ .square3{
background-color: black;
transition: 0.5s;
}
--> I sign MUST be used. In this case, I used the "~" sign, wich allowed me
to select any sibling element.
*/
/*
.parent div:nth-of-type(2n + 1) > div.item{
background-color: red;
}
--> o 1 significa "começe do primeiro" e o 2n significa "a cada dois, faça isso"
(ambos podem
ser modificados)
*/
/*Textarea leva em consideração tudo o que foi escrito no código: mútiplos espaços,
retornos, etc.*/
/*Another way to vertically align a determined item inside it's father element
is adding:
position: relative;
top: 50%;
transform: translateY(-50%);
--> The top: 50%; makes it 50% away from the top, and the transform:translateY(-
50%) "pulls" it half of it's height upwords.
Or, you can also set line-height = height. This will vertically center the text.
*/
Prefixes:
-webkit-
-moz-
propertie::-ms-expand{
display: none;
}
*/