qqxu
3/12/2018 - 9:43 AM

serval ways for write css color

serval ways for write css color


<style>
.txt {
  color: rgb(255, 255, 0);
}

// or
.txt {
  color: #eaeaea;
}


// or
.txt {
  color: #f01;   // Equivalent to #ff0011
}


// or
.txt {
  color: red;  
}


// or
.txt {
  color: rgb(100%, 100%, 0%);   //when we use rgb of percentage , 0 needs percent sign. In other case, 0 does not required units
}

</style>


<span class="txt">hello</span>