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. java为什么匿名内部类的参数引用时final(转)

    https://blog.csdn.net/z69183787/article/details/68490440 https://www.zhihu.com/question/21395848 htt ...

  2. mysql配置文件修改

    mysql配置文件修改       mkdir –p /data/mysql chown -R mysql.mysql /data/mysql/     vim /etc/my.cnf [mysqld ...

  3. centos6.5远程桌面连接(VNC\SPice)

    在Linux下用vnc远程桌面,centos中默认没有安装VNC 查询系统是否安装VNC # rpm -q tigervnc tigervnc-server 安装VNC服务 # yum install ...

  4. [UE4]使用UFUNCTION注意事项

    #pragma once #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" #include ...

  5. 对象生命周期中至少被GC一次后存活

    Finalize调用流程:GC时,当对象变成(GC Roots)不可达时,若该对象覆盖(重写)了finalize方法并且未执行过finalze方法,则将其放入F-Queue队列,由一低优先级线程执行该 ...

  6. Android 设置SeekBar不可拖动

    public class MyProgressBar extends SeekBar { /** * 是否支持拖动进度 */ private boolean touch = true; public ...

  7. go语言功能代码

    一.数据类型转换 package main import ( "fmt" "strconv" ) func main() { //int到string str ...

  8. netbeans运行项目时,弹出“cannot be run from folder that contains non-ASCII characters in path”的对话框 解决方法

    netbeans运行项目时,弹出“cannot be run from folder that contains non-ASCII characters in path”的对话框,原因是项目路径中有 ...

  9. 第8章 传输层(2)_UDP协议

    2. 用户数据报协议(UDP) 2.1 UDP的特点 (1)UDP是无连接的,即发送数据之前不需要建立连接,因此减少了开销和发送数据之前的时延. (2)UDP使用了尽最大努力交付,即不保证可靠交付,因 ...

  10. javascript-添加 class 类 和 移出 class 类 方法

    /* 添加 class 类 和 移出 class 类 方法*/ function addClass(element, className) { if(!new RegExp("(^|\\s) ...