Css Flashcards
how to link HTML and Css
<head>
<link></link>
</head>
text color
colour
background color
background-color
;
semicolon
Txt-align
lef center right
how to adjust the boldness of txt
font-weight
text-decoration
text-decoration: blue underline;
or
text-decoration: #996219 underline wavy;
line-height:
space between lines
letter-spacing
space between letters
font-family:
to chose the font
text-transform:
upercase
capitalise
none
full width
full-size-kan
universal selector:
select every piece
selector=> *{}
element selector:
selector=> button{}
select a list
selector=> h1,h2{}
Id selector
selector=>#signup
class selector
selector=>.Ali{}
selector=>li a{}
Descendant selector
select all <a>’s that are nested inside an <li>
____________________
.Ali a{}
Select all <a>’s that are nested inside Ali class
_________________-
Section span a{}</a></a>
selector=>h1+p{}
Adjustment selector:
select only the paragraph that comes right after an h1
selector=>footer>a{}
Direct Child selector:
select links that are direct children of a footer
selector=> input[type=”text”]{}
Attribute selector:
select all input elements where the type attribute is set to “text”
selector=>section.post
it will select only the section with the class post
pseudo classes=> pseudo(pronauciation:sudo) classes
keywords that we add to a selector that specifies state of the selected element.
:
colon
pseudo classes=> hover:
button:hover{}
________________
.post button:hover{}
pseudo classes=>Aktiv:
button:aktiv{}
pseudo classes=>cheked:
for any input with type of radio. for example yo can change the color when its cheked.
input:cheked{color:red;}
pseudo classes=>nth-of-type:
select an element based on the position among sibilings of same type.
P:nth-of-type(2){}
P:nth-of-type(2n){}
P:nth-of-type(2n+1){}
Pseudo Element:
keywords added to a selector that lets you style a particular part of selected elements.
they all start with two semicolons.
h2::first letter{}
________________
p::first-line{}
_________________
p::selection{background-color:yellow}
the background color will change to yellow when we select the text.
The cascade
It means the order is important.
what is Box Model
It is basically just the idea that everything in CSS is a Box
Borde, Margin, Padding
thickness of the border
border-width
color of border
border-color
controle the border line style
border-style
change the right side of border color
border-right-color
change the right side of border line style
border-right-style
change the right side of border thikness
border-right-width
change width style and color of border at once
border: medium dashed red;
control corner redius of border
border-redius: 10px;
border redius: 50%;
change top right border redius
border-top-right-redius:10px
change every corner of the border to diffrent values at once
border-redius:10% 20% 30% 40%;
color of border in inspect
blue
color of padding in inspect
green
color of margin in inspect
orande
change the right side padding
padding-right
change the left side padding
padding-left