use hex code to mix colors - zilongxuan001/LearnFreecode GitHub Wiki
利用6个十六进制数字,可以表达1600万多个颜色。
0
是十六进制中最小的数字,代表颜色的完全缺失。
F
是十六进制中最大的数字,代表颜色的最大亮值。
示例如下
<style>
.red-text {
color: #FF0000;
}
.green-text {
color: #00FF00;
}
.dodger-blue-text {
color: #2998E4;
}
.orange-text {
color: #FFA500;
}
</style>
<h1 class="red-text">I am red!</h1>
<h1 class="green-text">I am green!</h1>
<h1 class="dodger-blue-text">I am dodger blue!</h1>
<h1 class="orange-text">I am orange!</h1>
dodgor-blue,宝蓝色
浏览器显示如下
Basic CSS: Use Hex Code to Mix Colors | Learn freeCodeCamp
2018-10-7 16:55:59