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.

Review CSS Selectors的更多相关文章

  1. BeautifulSoup高级应用 之 CSS selectors /CSS 选择器

    BeautifulSoup支持最常用的CSS selectors,这是将字符串转化为Tag对象或者BeautifulSoup自身的.select()方法. 本篇所使用的html为: html_doc ...

  2. 转:SELENIUM TIPS: CSS SELECTORS

    This page will show you some CSS rules and pseudo-classes that will help you move your XPATH locator ...

  3. (3)选择元素——(4)css选择器(CSS selectors)

    The jQuery library supports nearly all of the selectors included in CSS specifications 1 through 3, ...

  4. CSS selectors for Selenium with example,selenium IDE

    CSS selectors for Selenium with example http://seleniumeasy.com/selenium-tutorials/css-selectors-tut ...

  5. [Selenium] 在Chrome的开发者工具中验证检查XPath/CSS selectors

    Evaluate and validate XPath/CSS selectors in Chrome Developer Tools Method 1 : From Elements panel U ...

  6. css selectors tips

    from https://saucelabs.com/resources/articles/selenium-tips-css-selectorsSauce Labs uses cookies to ...

  7. CSS Selectors

    CSS selectors are used to "find" (or select) HTML elements based on their element name, id ...

  8. Why are dashes preferred for CSS selectors / HTML attributes?

    Why are dashes preferred for CSS selectors / HTML attributes? I use dashes because I don't have to h ...

  9. flight.Archives001 / CSS Selectors选择器

    Title/CSS选择器 序 : 这是flight.Archives 梦开始的地方, 作者我熬夜肝出来了这篇文章... 保证这是最简洁高效的 CSS Selectors 教程 Note : 暂时没有能 ...

随机推荐

  1. 远程服务器安装mysql数据库

    https://www.cnblogs.com/renjidong/p/7047396.html 1.新开的云服务器,需要检测系统是否自带安装mysql # yum list installed | ...

  2. GVRP

    一.GARP和GVRP GARP全称是通用属性注册协议(Generic Attribute Registration Protocol),它为处于同一个交换网内的交换成员之间提供了分发.传播.注册某种 ...

  3. ORM多表操作之创建关联表及添加表记录

    创建关联表 关于表关系的几个结论 (1)一旦确立表关系是一对多:建立一对多关系----在多对应的表中创建关联字段. (2)一旦确立表关系是多对多:建立多对多关系----创建第三张关系表----id和两 ...

  4. Centos7下安装Python3.7.2

    在我的Centos7中,Python默认是安装的,输入python 直接可以查看版本号,入下图 注意:如果本机安装了python2,尽量不要管它,使用python3运行python脚本就好,因为可能有 ...

  5. conda和pip环境管理

    1.anaconda换源 制定清华的源: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/ ...

  6. Linux之间用SSH传输文件 一行命令实现

    把本机的文件传到目标: cd /home/ && tar czv test | ssh root@HostIP -p 22 'tar xz' 解释: 如你所见,这行命令其实由多个命令组 ...

  7. 【Unix网络编程】chapter6IO复用

    chapter6  6.1 概述 I/O复用典型使用在下列网络应用场合. (1):当客户处理多个描述符时,必须使用IO复用 (2):一个客户同时处理多个套接字是可能的,不过不叫少见. (3):如果一个 ...

  8. webpack 配置案例for angular babel

    1.dev.js: const webpack = require('webpack'); const webpackUglifyJsPlugin = require('webpack-uglify- ...

  9. MySQL查询表的所有列名,用逗号拼接

    问题场景 在MySQL中,需要以逗号拼接一个表的所有字段 sql语句 SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") FROM inf ...

  10. system 系统调用、gcc编译过程

    system 库函数的功能是执行操作系统的命令或者运行指定的程序 #include <stdio.h> #include <stdlib.h>//引入库 int main() ...