没有合适的资源?快使用搜索试试~ 我知道了~
CSS - cascading style sheets - Tutorial
1 下载量 132 浏览量
2024-06-20
11:29:51
上传
评论
收藏 889KB PDF 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/89459756/0001-39c5beb07188680686b8e657de534faa_thumbnail.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
28页
Table of Contents About the Tutorial Audience Prerequisites Copyright & Disclaimer Table of Contents 1 CSS ─ OVERVIEW 1 What is CSS?1 Advantages of CSS1 Who Creates and Maintains CSS?1 CSS Versions2 2 CSS ─ SYNTAX 3 The Type Selectors3 The Universal Selectors3 The Descendant Selectors 4 The Class Selectors4 The ID Selectors 4 The Child Selectors5 The Attribute Selectors 5 Multiple Style Rules 6 Grouping Selectors6
资源推荐
资源详情
资源评论
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![ppt](https://img-home.csdnimg.cn/images/20210720083527.png)
![ppt](https://img-home.csdnimg.cn/images/20210720083527.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![ppt](https://img-home.csdnimg.cn/images/20210720083527.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083646.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![chm](https://img-home.csdnimg.cn/images/20210720083646.png)
![thumb](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/89459756/bg1.jpg)
![](https://csdnimg.cn/release/download_crawler_static/89459756/bg2.jpg)
i
About the Tutorial
CSS is used to control the style of a web document in a simple and easy way. CSS stands
for Cascading Style Sheets. This tutorial covers both the versions CSS1 and CSS2 and
gives a complete understanding of CSS, starting from its basics to advanced concepts.
Audience
This tutorial will help both students as well as professionals who want to make their
websites or personal blogs more attractive.
Prerequisites
You should be familiar with:
Basic word processing using any text editor.
How to create directories and files.
How to navigate through different directories.
Internet browsing using popular browsers like Internet Explorer or Firefox.
Developing simple Web Pages using HTML or XHTML.
If you are new to HTML and XHTML, then we would suggest you to go through our HTML
Tutorial or XHTML Tutorial first.
Copyright & Disclaimer
Copyright 2017 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at contact@tutorialspoint.com
![](https://csdnimg.cn/release/download_crawler_static/89459756/bg3.jpg)
ii
Table of Contents
About the Tutorial .....................................................................................................................................
Audience .................................................................................................................................................. i
Prerequisites ............................................................................................................................................ i
Copyright & Disclaimer ............................................................................................................................. i
Table of Contents .................................................................................................................................... ii
1. CSS ─ OVERVIEW ................................................................................................................. 1
What is CSS? ............................................................................................................................................ 1
Advantages of CSS ................................................................................................................................... 1
Who Creates and Maintains CSS? ............................................................................................................ 1
CSS Versions ............................................................................................................................................ 2
2. CSS ─ SYNTAX ...................................................................................................................... 3
The Type Selectors .................................................................................................................................. 3
The Universal Selectors ........................................................................................................................... 3
The Descendant Selectors ....................................................................................................................... 4
The Class Selectors .................................................................................................................................. 4
The ID Selectors ...................................................................................................................................... 4
The Child Selectors .................................................................................................................................. 5
The Attribute Selectors ........................................................................................................................... 5
Multiple Style Rules ................................................................................................................................ 6
Grouping Selectors .................................................................................................................................. 6
3. CSS ─ INCLUSION ................................................................................................................. 8
Embedded CSS - The <style> Element ...................................................................................................... 8
Attributes ................................................................................................................................................ 8
Inline CSS - The style Attribute ................................................................................................................ 9
Attributes ................................................................................................................................................ 9
![](https://csdnimg.cn/release/download_crawler_static/89459756/bg4.jpg)
iii
External CSS - The <link> Element ........................................................................................................... 9
Attributes .............................................................................................................................................. 10
Imported CSS - @import Rule ................................................................................................................ 11
CSS Rules Overriding ............................................................................................................................. 11
Handling Old Browsers .......................................................................................................................... 12
CSS Comments ...................................................................................................................................... 12
4. CSS ─ MEASUREMENT UNITS ............................................................................................. 13
5. CSS ─ COLORS .................................................................................................................... 14
CSS Colors - Hex Codes .......................................................................................................................... 14
CSS Colors - Short Hex Codes ................................................................................................................. 15
CSS Colors - RGB Values......................................................................................................................... 16
Building Color Codes ............................................................................................................................. 16
Browser Safe Colors .............................................................................................................................. 16
6. CSS ─ BACKGROUND .......................................................................................................... 20
7. CSS ─ FONTS ...................................................................................................................... 23
Set the Font Family ............................................................................................................................... 23
Set the Font Style .................................................................................................................................. 23
Set the Font Variant .............................................................................................................................. 24
Set the Font Weight .............................................................................................................................. 24
Set the Font Size .................................................................................................................................... 24
Set the Font Size Adjust ......................................................................................................................... 25
Set the Font Stretch .............................................................................................................................. 25
Shorthand Property ............................................................................................................................... 26
8. CSS ─ TEXT ......................................................................................................................... 27
Set the Text Color .................................................................................................................................. 27
![](https://csdnimg.cn/release/download_crawler_static/89459756/bg5.jpg)
iv
Set the Text Direction ............................................................................................................................ 28
Set the Space between Characters ........................................................................................................ 28
Set the Space between Words ............................................................................................................... 28
Set the Text Indent ................................................................................................................................ 29
Set the Text Alignment .......................................................................................................................... 29
Decorating the Text ............................................................................................................................... 30
Set the Text Cases ................................................................................................................................. 30
Set the White Space between Text ........................................................................................................ 31
Set the Text Shadow ............................................................................................................................. 31
9. CSS ─ IMAGES .................................................................................................................... 32
The Image Border Property ................................................................................................................... 32
The Image Height Property ................................................................................................................... 32
The Image Width Property .................................................................................................................... 33
The -moz-opacity Property .................................................................................................................... 34
10. CSS ─ LINKS ........................................................................................................................ 36
Set the Color of Links............................................................................................................................. 36
Set the Color of Visited Links ................................................................................................................. 37
Change the Color of Links when Mouse is Over ..................................................................................... 37
Change the Color of Active Links ........................................................................................................... 37
11. CSS ─ TABLES ..................................................................................................................... 38
The order-collapse Property .................................................................................................................. 38
The border-spacing Property ................................................................................................................. 39
The caption-side Property ..................................................................................................................... 41
The empty-cells Property ...................................................................................................................... 43
The table-layout Property ..................................................................................................................... 44
剩余27页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
concisedistinct
- 粉丝: 1097
- 资源: 124
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- cluster代码sfsfsfsf
- web前端大作业 课程设计 React悦享小说 用于学习练习
- vanilla-web-dev
- HTML5期末前端大作业 仿苏宁易购 移动端 19页 自适应响应式
- 1719551026120856.000000.jpg
- 72V转12V非隔离DCDC电源原理图+PCB源文件
- bhvyhunjbhjjvj
- A computer virus 电脑病毒
- 【信号与系统】 - Signals and Systems - A Primer with matlab
- W25QXX-STM32F4-ALY:设计NOR Flash(SPI接口)的Flashloader(MCU: stm32f4)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)