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

html-css09

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(百分百)。

这个是IE默认font-size属性的问题

IE默认的font-size:12px会影响盒子的高度,除非你盒子里面有文字,

以后记得在没有内容的DIV里面加上 font-size:2px

所以你只要给 .main 加上 font-size:0px就OK了。

当然,.main里面要加内容的话,你可以把 font-size:0px放到各个定角的DIV。

以下是我调整过的:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />

<title>无标题文档</title>

<link rel="stylesheet" type="text/css" href="ChatWindow.css" />

<script type="text/javascript" language="javascript">

</script>

</head>

<style>

*

{

margin:0px

padding:0px

border:0px

}

.main

{

position:absolute

top:20px

left:20px

border:1px solid black

width:450px

height:500px

font-size:0px

}

.top_border

{

position:absolute

left:3px

top:0px

width:444px

height:3px

background-color:#FFCC00

cursor:n-resize

}

.left_border

{

position:absolute

left:0px

top:3px

height:494px

width:3px

background-color:red

cursor:e-resize

}

.right_border

{

position:absolute

right:0px

top:3px

width:3px

height:494px

background-color:#009900

cursor:e-resize

}

.bottom_border

{

position:absolute

bottom:0px

left:3px

width:444px

height:3px

background-color:#660000

cursor:n-resize

}

.right_bottom

{

position:absolute

right:0

bottom:0

width:3px

height:3px

background-color:#000000

cursor:nw-resize

}

.left_bottom

{

position:absolute

left:0

bottom:0

width:3px

height:3px

background-color:#000000

cursor:ne-resize

}

.left_top

{

position:absolute

left:0

top:0

width:3px

height:3px

background-color:#000000

cursor:nw-resize

}

.right_top

{

position:absolute

right:0

top:0

width:3px

height:3px

background-color:#000000

cursor:ne-resize

}

</style>

<body>

<div class="main">

<div id="top_border" class="top_border"></div>

<div class="left_border"></div>

<div class="right_border"></div>

<div class="bottom_border"></div>

<div class="right_bottom"></div>

<div class="left_bottom"></div>

<div class="left_top"></div>

<div class="right_top"></div>

<div class="title"></div>

<div class="chat_note"></div>

<div class="tools"></div>

<div class="editer"></div>

<div class="footer"></div>

</div>

</body>

</html>