week4.md - mozi5269/wp109b GitHub Wiki
- descendant selector (space)
- child selector (>)
- adjacent sibling selector (+)
- general sibling selector (~)
element element div p Selects all <p> elements inside <div> elements
element>element div > p Selects all <p> elements where the parent is a <div> element
element+element div + p Selects the first <p> element that are placed immediately after <div> elements
element1~element2 p ~ ul Selects every <ul> element that are preceded by a <p> element
The overflow: property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area.
The overflow: property has the following values:
- visible - Default. The overflow is not clipped. The content renders outside the element's box
- hidden - The overflow is clipped, and the rest of the content will be invisible
- scroll - The overflow is clipped, and a scrollbar is added to see the rest of the content
- auto - Similar to scroll, but it adds scrollbars only when necessary
- left - The element floats to the left of its container
- right - The element floats to the right of its container
- none - The element does not float (will be displayed just where it occurs in the text). This is default
The opacity property can take a value from 0.0 - 1.0. The lower value, the more transparent