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

Resumao Css

CSS selectors are used to select and style HTML elements. There are five categories of CSS selectors: simple selectors, combinator selectors, pseudo-class selectors, pseudo-element selectors, and attribute selectors. When multiple styles are specified for an element, the styles cascade based on priority, with inline styles having the highest priority and overriding external and internal stylesheets and browser defaults.

Uploaded by

mateus0992
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Resumao Css

CSS selectors are used to select and style HTML elements. There are five categories of CSS selectors: simple selectors, combinator selectors, pseudo-class selectors, pseudo-element selectors, and attribute selectors. When multiple styles are specified for an element, the styles cascade based on priority, with inline styles having the highest priority and overriding external and internal stylesheets and browser defaults.

Uploaded by

mateus0992
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CSS

Tipos de Seletores:

CSS Selectors
CSS selectors are used to "find" (or select) the HTML elements you want
to style.

We can divide CSS selectors into five categories:

 Simple selectors (select elements based on name, id, class)


 Combinator selectors (select elements based on a specific
relationship between them)
 Pseudo-class selectors (select elements based on a certain state)
 Pseudo-elements selectors (select and style a part of an element)
 Attribute selectors (select elements based on an attribute or
attribute value)

PRECEDENCIA ENTRE INLINE, EXTERNAL E INTERNAL: O ÚLTIMO


QUE FOI LIDO.

Cascading Order
What style will be used when there is more than one style specified for
an HTML element?

All the styles in a page will "cascade" into a new "virtual" style sheet by
the following rules, where number one has the highest priority:

1. Inline style (inside an HTML element)


2. External and internal style sheets (in the head section)
3. Browser default

So, an inline style has the highest priority, and will override
external and internal styles and browser defaults.

CRIANDO UM EXTERNAL:

<link rel="stylesheet" href="mystyle.css">

/* This is a single-line comment */


COR HSL:

hsl(hue, saturation, lightness)


SENTIDO HORARIO PARA A MARGEM:
FONTE RESPONSIVA:

<h1 style="font-size:10vw;">Responsive Text</h1>

Fontes Externas
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?famil
y=Audiowide|Sofia|Trirong">
<style>
h1.a {font-family: "Audiowide", sans-serif;}
h1.b {font-family: "Sofia", sans-serif;}
h1.c {font-family: "Trirong", serif;}
</style>
</head>
ADICIONANDO FONTES DE INCONES
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin
="anonymous"></script>

The child selector (>) selects all elements that are the children of a
specified element.
The + selector is used to select an element that is directly after another
specific element.

The general sibling selector (~) selects all elements that are next siblings
of a specified element.

You might also like