CSS 的颜色代码 透明色是什么代码?

html-css08

CSS 的颜色代码 透明色是什么代码?,第1张

透明色:transparent

背景色设为透明,代码如下:background-color:transparent

字体颜色设为透明,代码如下:color:transparent

扩展资料:

常用颜色代码分4种,分别如下:

1、常用颜色单词,比如green(绿色),yellow(黄色),red(红色),transparent(透明色)等;

2、以#号开头的六个字符组成的颜色代码,比如:#FF0000(红色),#000000(黑色),#F9F900(黄色)等;

3、颜色rgb值,表达方式:rgb(参数1,参数2,参数3),三个参数分别表示r,g,b

1)R:红色值。正整数|百分数

2)G:绿色值。正整数|百分数

3)B:蓝色值。正整数|百分数

4、rgba(参数1,参数2,参数3,参数4),这种方式前三个参数与上面第3点种相同,第四个参数表示透明度,数值在0-1之间。0表示透明度为0(即透明色),1表示透明度为1(百分百)。

使用伪类改变颜色就可以了,点击前为蓝色,点击后为紫色,根据自己需要改变颜色就可以了。

a{text-decoration: underline} /*链接无下划线none,有为underline*/

a:link {color: #00007ftext-decoration: underline} /*未访问的链接 */

a:visited {color: #65038etext-decoration: underline} /*已访问的链接*/

a:hover{color: #ff0000text-decoration: underline} /*鼠标在链接上 */

a:active {color: #ff0000text-decoration: underline} /*点击激活链接*/

如果一直都是蓝色不变,也可以直接

a{color:blue}