[笔记]CSS--Cascading Style Sheet

CSS
===========================================
CSS is a rule that tells the browser how to
render a specified tag

type
 inline CSS
 File CSS
 Extended CSS

inline CSS
<h1 style="color:blue;font-style:italic">   //NOTICE :

File CSS
========================================
<style>...</style>  in head section

<head>
<style type="text/css" media="screen,print">   // type 统一文件描述  IMG/jpg 
 
 <!--
 h1{color:blue;font-style:italic}
 -->
 // or @import(abc.css)
</style>
</head>
========================================

Extended CSS
========================================

========================================

import
link to extended CSS
========================================
<head>
<link rel="stylesheet" type="text/css"
 href="URL">
</head>
========================================

Basic grammar of CSS
===========================================
Basic
 Selector{property1:value1;property2:value2;property3:value3;...}
Mutil-selector
 h1,h2,h3,h4,h5,h6{text-align:center}
===========================================

Selectors in context
===========================================
ol li{list-style:upper-roman}
ol ol li{list-style:upper-alpha}
ol ol ol li{list-style:decimal}
h1 em{color:red}
h1 em,p strong,address{color:blue}  //多选择器 & 上下文
===========================================

Special selector通用选择器
* {color:purple}

class of style
===========================================
<style>
<!--
p.abstract{font-style:italic}
-->
</style>

...

<p class=abstract>
...
</p>
===========================================

General class of style
===========================================
.italic{font-style:italic}

<p class=italic>
...
</p>
===========================================

Pseudo-class
===========================================
A.visited{color:blue}
<a href="zzz" class="visited">...</a>

Visited
Link
Active

===========================================

Style attributes
 font
 color
 background
 text
 frame
 set

Value of attributes
 keyword: underline,small
 Length:1.5CM,+0.25mm,-3pt
 percentage
 URL: url
 color:
  aqua,black,blue,fuchsia,gray,green,lime,maroon
  Rgb(100%,100%,100%)
  Rgb(255,255,255)
  #rrggbb   //16
  #rgb    

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值