zoukankan      html  css  js  c++  java
  • Review CSS Selectors

    Throughout this lesson, you learned how to select HTML elements with CSS and apply styles to them. Let's review what you learned:

    CSS can change the look of HTML elements. In order to do this, CSS must select HTML elements, then apply styles to them.
    CSS can select HTML elements by tag, class, or ID.
    Multiple CSS classes can be applied to one HTML element.
    Classes can be reusable, while IDs can only be used once.
    IDs are more specific than classes, and classes are more specific than tags. That means IDs will override any styles from a class, and classes will override any styles from a tag selector.
    Multiple selectors can be chained together to select an element. This raises the specificity, but can be necessary.
    Nested elements can be selected by separating selectors with a space.
    The !important flag will override any style, however it should almost never be used, as it is extremely difficult to override.
    Multiple unrelated selectors can receive the same styles by separating the selector names with commas.
    Great work this lesson. With this knowledge, you'll be able to use CSS to change the look and feel of websites to make them look great.

  • 相关阅读:
    1002. 查找常用字符
    1047. 删除字符串中的所有相邻重复项
    3. 无重复字符的最长子串
    剑指 Offer 57
    239. 滑动窗口最大值
    476. 数字的补数
    876. 链表的中间结点
    973. 最接近原点的 K 个点
    面试题 02.04. 分割链表
    1616. 分割两个字符串得到回文串
  • 原文地址:https://www.cnblogs.com/young-ma/p/7647866.html
Copyright © 2011-2022 走看看