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. 廖雪峰Java2面向对象编程-2数据封装-1方法重载

    方法重载 方法重载Overload是指:多个方法的方法名相同,但各自的参数不同 参数的个数不同 参数的类型不同 参数位置不同 方法返回值类型通常都是相同的 目的:相同功能的方法使用同一名字,便于调用 ...

  2. mvc5总结(1)

    1.Global.asax 全局的启动项,初始化相关配置 2.路由,按照默认规定请求就行,没必要扩展太多 3.区域路由,当我们想命名相同的controller和action时,结合命名空间使用 pub ...

  3. 获取地图文档(*.mxd)中比例尺问题

    地图比例尺的概念是建立在有投影坐标系的空间参考前提下,将地图缩放到一定大小的比例值. 在多数情况下,我们都是将一个地图文档(*.mxd)加载到地图控件中(AxMapControl)显示出来,照此去获取 ...

  4. OA-DB-LINUX安装说明

    HOST配置: HOST1:OADB-NODE1.LSTECH.COM HOST2:OADB-NODE2.LSTECH.COM 每台主机配置两个不同VLAN的IP地址 OSUSER:oracle 1. ...

  5. Mybatis 系列3-结合源码解析properties节点和environments节点

    [Mybatis 系列10-结合源码解析mybatis 执行流程] [Mybatis 系列9-强大的动态sql 语句] [Mybatis 系列8-结合源码解析select.resultMap的用法] ...

  6. OpenCV-Python基本功能

    一.图像读取/保存 import cv2 img = cv2.imread("name.png") cv2.imwrite('save.jpg', img) #显示图像 cv2.i ...

  7. Delphi XE5中的新增内容

    Delphi XE5中的新增内容 Delphi XE5是所有Delphi开发人员的必须备升级,并且是来自Embarcadero的获奖的.多设备应用开发解决方案的最新版本.使用Delphi XE5的新特 ...

  8. Java并发编程中的相关注解

    引自:http://www.cnblogs.com/phoebus0501/archive/2011/02/21/1960077.html Java并发编程中,用到了一些专门为并发编程准备的 Anno ...

  9. Android忘记锁屏密码如何进入手机?

    Android忘记锁屏密码如何进入手机?     1.关闭手机 2.进入recovery模式(即恢复模式,记住不是挖煤模式.进入恢复模式不同手机有不同方法,三星的话安主页键,关机键和音量+(或-键), ...

  10. JVM总结-异常处理

    众所周知,异常处理的两大组成要素是抛出异常和捕获异常.这两大要素共同实现程序控制流的非正常转移. 抛出异常可分为显式和隐式两种.显式抛异常的主体是应用程序,它指的是在程序中使用“throw”关键字,手 ...