8 Applied Visual Design Flashcards
Align text
text-align: center
left
right
justify
Bold text
2 ways
what are the range of numbers and what do they represent?
strong>
/strong>
font-weight: bold
bold
bolder
lighter
(or numbers) Defines from thin to thick characters. 400 is the same as normal, and 700 is the same as bold 200 300 400 - Normal 500 600 700- Bold 800 900
Underline text
2 ways
u>
/u>
text-decoration: underline
Italicize text
2 ways
em> (for emphasize)
/em>
font-style: italic
Slash text
2 ways
s>
/s>
text-decoration: line-through
Create a horizontal line
hr>
For horizontal
Color with opacity
rgba(255,255,255,1)
alpha is from 0 to 1
Create a box shadow
box-shadow: 10px 10px 20px rgba(0,0,0,0.19)
offset-x (how far to push the shadow horizontally from the element),
offset-y (how far to push the shadow vertically from the element),
blur-radius,
spread-radius and
color, in that order.
Blur and spread radius are optional
Multiple box shadows
box-shadow: 10px, 10px, 20px, rgba(0,0,0,0.19), 10px, 10px, 20px, rgba(0,0,0,0.19)
Create a text shadow
text-shadow: 10px 10px 20px rgba(0,0,0,0.19) (no commas in between values)
offset-x (how far to push the shadow horizontally from the element),
offset-y (how far to push the shadow vertically from the element),
blur-radius,
spread-radius and
color, in that order.
Blur and spread radius are optional
Multiple text shadow
text-shadow: 10px, 10px, 20px, rgba(0,0,0,0.19), 10px, 10px, 20px, rgba(0,0,0,0.19)
Opacity
opacity: 0.5
0-1 scale
Change text to all upper/lower case, capitalize first letters, initial or inherit.
text-transform: uppercase lowercase capitalize- "Transform Me Now" initial- Use the default value inherit -Use the text-transform value from the parent element none
inherit:
span {
color: blue;
}
.extra span {
color: inherit;
}
Control line spacing
line-height: 25px;
Make all anchor tags change color on hover
a {
color: black;
}
a:hover {
color: blue;
}
a psuedoclass
How does box and line positioning work in HTML
BLOCK-level items automatically start on a new line while INLINE items sit within surrounding content
The default layout of elements in this way is called the normal flow of a document, but CSS offers the position property to override it.
How does relative positioning work?
Move an element visually relative to it’s current position.
It can overlap other elements.
When the position of an element is set to relative, it allows you to specify how CSS should move it relative to its current position in the normal flow of the page. It pairs with the CSS offset properties of left or right, and top or bottom. These say how many pixels, percentages, or ems to move the item AWAY from where it is normally positioned.
p { position: relative; bottom: 10px; } Moves 10 px from the bottom (upwards)
p { position: relative; top: 10px; } Moves 10 px from the top (downwards)