ຄູ່ມວຍຄືນ CSS

ກຳນົດສີຈະຜ່ານການໃຊ້ຊື່ສີທີ່ກໍານົດກ່ອນຫຼື RGB、HEX、HSL、RGBA、HSLA ຄຸນນະພາບ.

ຊື່ສີ CSS

ໃນ CSS ສາມາດໃຊ້ຊື່ສີເພື່ອກຳນົດສີ:

Tomato
Orange
DodgerBlue
MediumSeaGreen
Gray
SlateBlue
Violet
LightGray

亲自试一试

CSS/HTML ສະໜັບສະໜຸນ 140 ນະນະຄະດີສະເພາະ

ສີພາບຫຼັງສອນ CSS

ທ່ານສາມາດກຳນົດສີພາບຫຼັງສອນ HTML ສະນັກ:

Welcome to China
China is a great country!

ຄວາມຈຳນວນ

<h1 style="background-color:DodgerBlue;">China</h1>
<p style="background-color:Tomato;">China is a great country!</p>

亲自试一试

ສີຂອງຄວາມຂຽນ CSS

ທ່ານສາມາດກຳນົດສີຂອງຄວາມຂຽນ:

China

China is a great country!

China, officially the People's Republic of China, is a country in East Asia.

ຄວາມຈຳນວນ

<h1 style="color:Tomato;">China</h1>
<p style="color:DodgerBlue;">China is a great country!</p>
<p style="color:MediumSeaGreen;">China, officially the People's Republic of China...</p>

亲自试一试

ຄູ່ມວຍຄືນ CSS

ທ່ານສາມາດກຳນົດສີຂອງວຽງກອງ:

Hello World
Hello World
Hello World

ຄວາມຈຳນວນ

<h1 style="border:2px solid Tomato;">Hello World</h1>
<h1 style="border:2px solid DodgerBlue;">Hello World</h1>
<h1 style="border:2px solid Violet;">Hello World</h1>

亲自试一试

CSS ການສະແດງຄວາມສະຫວັນ

ໃນ CSS, ທ່ານສາມາດນຳໃຊ້ຄວາມພາບ RGB, HEX, HSL, RGBA ຫຼື HSLA ເພື່ອກຳນົດສີ:

ກັບນະນະຄະດີ "Tomato":

rgb(255, 99, 71)
#ff6347
hsl(9, 100%, 64%)

ກັບນະນະຄະດີ "Tomato" ແຕ່ປຸງຄວາມໂປ່ງສະທາງ 50%:

rgba(255, 99, 71, 0.5)
hsla(9, 100%, 64%, 0.5)
<h3>ຄວາມຈຳນວນ</h3>
<h1 style="background-color:rgb(255, 99, 71);">...</h1>

...

...

...

...

亲自试一试

了解有关颜色值的更多信息

在下一章中,您将学习有关 RGBHEXHSL ຂອງຕອນຕໍ່ໄປ.