CSS
CSS
@import
url('https://fonts.googleapis.com/css2?family=Edu+AU+VIC+WA+NT+Hand:wght
@400..700&display=swap');
/*Css incorporado/interno*/
/*<style>
body{
background-color: yellow;
</style>
<head>*/
/*
/*hieraquia*/
/*pode se fazer varios csss externos para diferentes temáticas para a pagina
html*/
Ex: body{} \ p{} todos elementos com as tag p e o body vão ter om só
coportamento*/
/*Classes são marcações padronizadas colocadas nas tag html, para serem
estilizadas no css
/*id é uma marcação unica para uma só tag no html- id="teste" no css-
#teste{color="blue"} so a tag que tiver o id teste ira ter o fundo azul . obs: Não se
pode utilizar numeros no inicio do id ou nas classes.*/
/*O suposto curinga é utilizado para colocar propiedades para todas as tags do
formulario html
Ex: h1, p{color="center"} a cor de fundo azul vai valer para as tags h1 e p.*/
Ex: .tmt {
color:blue;
propiedade background - serve para colorir o fundo da pagina com cores sólidas.
Ex: as{background:blue}
heigth="100px"
back-color="gray"}
Para colocar a imagem de fundo. baixar a imagem na pasta onde está o projeto.
bacground-image:url(../)
background-size:cover/contain;- utilizado para que a imagem se adapte ao
tamanho da pagina.
/*short-end/atalho.
tipos de
bordas:solid/dotted/dashed/double/groove/ridge/inset/outset/none/hidden
localização da borda:
EX: border-top:
border- left:
border-rigth:
border-bottom:
borda arredondada:
border-radius:30px*/
/*marging é o espaçamento.
Ex: marging-top:30px;
marging-left::
marging-right:
marging-bottom:
Ex .p{marging-bottom: 60px;
marging-left: 40px;
marging-right:30px;}
*/
padding-top:
padding-right
padding-left
pading-bottom:
padding: 50px;
criar um botao
Ex:
.botao {
background-color: aqua;
color: azure;
padding: 10px;
border-radius: 5px;
text-decorration: none;
.botao:hover {
bacground: blue
*/
/*width:300px;-largura;
height:40px;-altura;
/*propiedade de texto
text-align:center/left/right/justify;alinhamento de texto.
text-decorrection:over-line/line-throug/underline
text-transform:uppercaseA/lowercasea/Acapitalize;
text-ident:50px; Identação
*/
Ex:font-family:Calibri;
font-weight:bold/100/900;lagura da fonte*/
/*Estilização de links
Ex: a.btn1{bacground:darkgreen;
color:white;
padding: 10px;
a.btn1:hover {
bacground: red;
color: white;
padding: 12px;
Ex:
a.btn2 {
text-decoration: none;
padding: 10px;
color: blue;}
a.btn2:hover{
text-decoration: underline;
padding: 8px;
background:blue;
color:white;}
a.btn3{color:black;
text-decoration:none;}
a.btn3:hover {
color: red;
a.btn4{
text-decoration:none;
color:blue;
font-size:18px;}
a.btn4:hover{
font-size: 22px
font-weight:bold;;
a.btn5{cursor:;Comportamento do cursor
}*/
display:block; ocupa a tela inteira e ocupa o bloco completo pois funciona pois é
o elemento de um layout.
<li>Primeiro</li>
<li>Segundo</li>
<li>Terceiro</li>
</ul>)
.azul{background:blue;}
.azul {
background: red;
.azul {
background: green;
li{display:inline;})
obs: para colocar os elementos com display inline sem espaçamento, tenho
que no html colocar as tags uma a frente de outra, nesse caso juntas.
display:inline-block;
css(div{width:33%;
heigth:150px;
display:inline-block;})
obs: As tag do tipo in line normalmente nao obedecem poi temos que aprender a
propiedade display.
*/
Ex:
.ex2{
max-width: 800px; a Largura do site se adapta a qualquer tela- para ter um site
responsivo.}**/
css(
Relative
.div1 {
position: relative;
left: 20px;
width: 30px;
height: 100px;
background: white;
display:inline-block;
})
z-index- seve para colocar a camada por de trás de outra camada, varia de -1 a
999.
.div {
position: relative;
left: 20px;
width: 30px;
height: 100px;
background: white;
z-index:-1/999;
.div {
position: fixed;
left: 20px;
width: 30px;
height: 100px;
background: white;
bottom:10px;
rigth:10px;
.container {
top: 20px;
width: 30px;
height: 100px;
background: white;
bottom: 10px;
rigth: 10px;
.div3{
position: absolute;
width: 30px;
height: 100px;
background: red;
top: 250px;
right: 50px;
display: inline-block;
stick - ela é pegajosa e se desloca só dentro da tag pai/ a tag pai deve estar relativo
.div {
position: sticky;
top:0;
width: 30px;
height: 100px;
background: white;
bottom: 10px;
rigth: 10px;
*/
/*Ouverflow´
.exemplo{background: whith;
color: blue;
heigth: 150px;
overflow: auto;}
cima - baixo
body{
overflow:hidden;}
direira - esquerda
body {
overflow-x: hidden;
<p>lorem</p>
</div>
css
.container {
.container img{
float: left
marging-rigth:20px;
margin-bottom:10px;
html
<ul>
</ul>
css
ul {
background: black;
li {
display: inline-block;
li a {
color: white;
text-decoration: 20px;
li a:hover {
background: white;
color: black
.login{float:right}
*/
html
css
.img1 {
Opacity: 0.2;
.img1:hover {
Opacity: 0.2;
.botao: {pading:23px;
.botao:hover{
opacity:0.9;}
.transparente{background: blue;
color:white;
padding;40px;
opacity: 0.5;
*/
/*Efeito dropdwon
html
css
ul {
background: black;
list-style-type: none;
padding: 0;
margin: 0;
overflow: hidden;
li {
float: left;
li a,
.dropbtn {
display: inline-block;
color: white;
text-decoration: none;
text-align: center;
li a:hover,
.dropdown:hover .dropbtn {
background: red;
li.dropdown {
display: inline-block;
.dropdown-content {
display: none;
position: absolute;
background: white;
width: 150px;
.dropdown-content a {
color: black;
display: block;
text-align: left;
.dropdown-content a:hover {
color: white;
.dropdown:hover .dropdown-content {
display: block;
/*Especifidades css
ordem de prioridade:
1-In line
2-Classes
3-Incorporado
//////
ordem final
1-id
2-tag.class
3-.class
4-tag
*/
! important
Ex: .grs{
color:blue;
!important;}
*/
.gra{background-img: linear-gradiente(Blue,
red)
posições
.gra {
red) }
Pode se utilizar varias cores ao mesmo tempo
.gra {
background-img: radial-gradiente(Blue50%,
red/30%)*/
Ex:
.tge{
color:blue;
Multiplas sombras
.multi{
color: blue;
Box Shadow
.caixa{
width:40p%
~heigth: 300px;
background: gray;
width:40p%~heigth: 300px;
background: gray;
/*Efeito de texto
.caixa {
background: gray;
padding-bottom; 30px;
na tag
marging-bottom:0;
padding-bottom: 0px;
}
.caixa:hover .reduzido{
*/
...
...
...
/* Super Largos (Telas maiores laptops, desktops e até TVs, 1200px para cima)
...s
.exemplo{
background:red;
heigth:400px;}
*/
html
<div>1</div>
<div>2</div>
<div>3</div>
css
.flex-pai {
background: blue;
display: flex/row/row-reverse/flex-reverse;
controle de elementos
.flex-pai {
flex-direction: column;
quando a largura da tela for menor que 600px o elemnto será uma coluna
.flex-pai div {
background: white;
margin: 5px;
padding: 30px;
text-align: center;
}*/
Variaveis
Ex: s= blue
.f{
color: s;}
Agrupamento de elementos
.header{
buttom{}
hover
button{
background:s;
}
&:hover{
background: yellow;
criar o header.scss
Ex:
@mixin flexcenter(){
display:flex;
justifiy-content: center;
align-items: center;
.header{
@includeflexcenter();}
.body{background-color: silver();}
.prt{
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-size: 20px;
.tmt{
font-size: 18px;
#ty{
text-align: center;
background-image:url(../css/226635-mathematics-equations-science-3D.jpg)
text-align: center;
font-size: 80px;
color: white;
.botao{
background-color: aqua;
color: azure;
padding: 10px;
border-radius: 5px;
text-decoration: none;
.botao:hover{
background: blue;