본문 바로가기

selector4

[CSS] Pseudo Classes and Pseudo Elements Not all elements have a pseudo classes and pseudo elements. Therefore, you have to carefully use it. Pseudo Classes :active This represents an element that is being activated by the user. :checked This represents any radio, checkbox, or option element that is checked or toggled to an on state. :first-child This represents the first element among a group of sibling elements. :focus This represent.. 2020. 8. 27.
[CSS] Combinators Descendant Combinator The descendant combinator uses space. It selects nodes that are descendants of the first selected element. This is a usage example. div span { color: teal; } Child Combinator The child combinator uses >. It selects a node that is direct children of the first element. This is a usage example. ul > li { font-weight: 700; } Adjacent Sibling Combinator The adjacent sibling comb.. 2020. 8. 26.
[CSS] Basic / Grouping Selector Basic Selectors Universal Selector The * selects all elements. We use this selector for applying some property globally. Here is the usage. * { margin: 0; } Type Selector The type selector selects all elements that have the specified HTML tag name. Here is the usage. div { width: 10px; } span { font-size: 12px; } h1 { color: teal; } ID Selector The ID selector selects an element that has the id .. 2020. 8. 24.
[CSS] Syntax The basic syntax of CSS is like below. selector { property: value; } The selector selects which element of HTML tag. The CSS block is specified by { }. The property means which property is applied to the selected tag. The value means what value is applied to the specified property. The : has to be located between property and value. The ; has to be located after the value. This is the example. d.. 2020. 8. 24.