W3.CSS Colors 颜色

红色的

粉色的

紫色的

深紫色

靛青

蓝色

浅蓝

青色

水族

青色

绿

浅绿色

酸橙

卡其色

黄色

琥珀色

橘子

深橙色

蓝灰色

棕色的

浅灰

灰色的

深灰色

淡红色

淡黄色

浅绿色

淡蓝色

W3.CSS 中使用的默认配色方案的灵感来自 Material Design Colors(营销、路标和便签中使用的颜色)。


着色 HTML 元素

W3-颜色W3-文本的颜色类可用于着色任何HTML元素:

容器:

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

纽扣:

     

文本:

   绿 

边框:

红色的

绿

蓝色

黄色

灰色的

黑色的

表:

姓名积分
吉尔史密斯50
伊芙·杰克逊94
亚当约翰逊67

牌:

汽车是一种用于运输的轮式、自供电机动车辆。该术语的大多数定义都指定汽车主要设计为在道路上行驶,可容纳 1 到 8 人,通常有四个轮子。(维基百科)



背景颜色

W3-颜色类设置任何HTML元素的背景色:

伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。


伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。


伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

例子 (Example)

<div class="w3-red">
  <h2>London</h2>
  <p>London is the most populous city in the United Kingdom,
  with a metropolitan area of over 9 million inhabitants.</p>
</div>

<div class="w3-yellow">
  <h2>London</h2>
  <p>London is the most populous city in the United Kingdom,
  with a metropolitan area of over 9 million inhabitants.</p>
</div>

<div class="w3-gray">
  <h2>London</h2>
  <p>London is the most populous city in the United Kingdom,
  with a metropolitan area of over 9 million inhabitants.</p>
</div>
       自己试试 »

颜色灰色灰色在所有W3.CSS类互换。


文字颜色

W3-文本的颜色类别设置任何HTML元素的文本颜色:

伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

例子 (Example)

<div class="w3-text-red">
  <h2>London</h2>
  <p>London is the most populous city in the United Kingdom,
  with a metropolitan area of over 9 million inhabitants.</p>
</div>
       自己试试 »

悬停颜色

W3-hover-类定义为任何HTML元素的背景悬停颜色:

伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

例子 (Example)

<div class="w3-container w3-orange w3-hover-red">
  <h2>London</h2>
  <p>London is the most populous city in the United Kingdom, with a metropolitan area of over 9 million inhabitants.</p>
</div>
       自己试试 »

W3-悬停文本的颜色类定义的任何HTML元素的文本悬停颜色:

伦敦

伦敦是英国人口最多的城市,大都市区人口超过 900 万。

例子 (Example)

<div class="w3-container w3-orange w3-hover-text-white">
  <h2>London</h2>
  <p>London is the most populous city in the United Kingdom, with a metropolitan area of over 9 million inhabitants.</p>
</div>
       自己试试 »

颜色库

除了标准的 W3.CSS 颜色,W3.CSS 还可以使用来自许多不同颜色库的颜色:

窗户颜色:

酸橙
绿
橄榄
青色
青色
蓝色
靛青
紫色
紫红色
粉色的
品红
红色的
橘子
琥珀色
黄色
棕色的
灰褐色
赭色
赤红

单击此处了解有关 Windows 颜色的更多信息


时尚色彩:

火焰
绿化
码头
月见草
中性灰色
阴影
云杉
海军
牡丹
黄褐色
港口

单击此处了解有关时尚色彩的更多信息


公路颜色:

红色的
绿
蓝色
黄色

单击此处了解有关颜色库的更多信息

在本教程后面的章节中,您将学到更多关于颜色的知识。


上一主题 W3.CSS Intro 介绍 下一主题 W3.CSS Containers 容器
  • 使用社交账号登录,本站支持
全部评论(0)