css中关于字体颜色的设置

html-css015

css中关于字体颜色的设置,第1张

#1 中的

background-color:#000

opacity:0.15

这两行 换成下面两行,如果不用兼容ie的话,就使用下面第一行就行了。

background-color: rgba(0,0,0,.15)

filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#00000000', EndColorStr='#00000000')\9

能做的,不过要配合font-size来,不过控制没有ps里的好啊。小图建议还是用ps的好。。

代码如下:

<!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>test</title>

<style type="text/css">

<!--

div { /*这个样式展示高度信息,到时注释掉 */

border:1px solid #69f

padding:3px

}

.logo {

width:200px

position:relative

}

.tt, .ss {

float:left

}

.ss {

font-size:36px

color:#c00

}

.tt {

font-size:24px

color:#9c0

top:10px

position:absolute

}

-->

</style>

</head>

<body>

<div class="logo">

<div class="ss">遵化</div><div class="tt">生活网</div>

</div>

</body>

</html>