CSS Flashcards
How do you flip an image?
img:hover {
transform: scaleX(-1);
}
how do u break long words and wrap onto the next line?
word-wrap
what does align-items do
align the items inside a flexible container
what are selectors? Mention their types
.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)
how do u Insert something after the content of each <p> element and Insert something before the content of each </p><p> element?</p>
::after and ::before
Mention few websafe fonts
arial , verdana , georgia , courier new , tahoma , times new roman
Mention the 5 generic fallback fonts
serif , sans serif , monospace , cursive , fantasy
write a piece of code to animate the background from red to blue
@keyframes mymove {
from {background-color: red;}
to {background-color: blue;}
}
what is pc in units?
picas
conversion from in to px and cm , from pt to int , pc to pt
inches (1in = 96px = 2.54cm)
pixels (1px = 1/96th of 1in)
points (1pt = 1/72 of 1in)
picas (1pc = 12 pt)
what are the two lengths in css?
absolute lengths and relative lengths
explain em
Relative to the font-size of the element (2em means 2 times the size of the current font)
16px = ….. em
1 em