做网页的时候怎么让填充颜色半透明

来源:百度知道 编辑:UC知道 时间:2024/05/10 10:16:53
在一个表格里面填充颜色,做出来后这个表格是半通明的,能看到背景怎么做?
就是前景色透明 能够看的到背景图片,我用PS保存了张.gif透明图片做背景 显示的还是不能透明, 请大仙帮帮忙说清楚点, 我是菜鸟~~~

方法一:
以下是个样式:
放在<head></head>间
<style>
.alpha{filter: Alpha(Opacity=50)} //50表示50%的透明度
</style>

以下表格
<table border="1" width="100" height="62" class="alpha" bgcolor="#F2A664" >
<tr>
<td width="100%" height="62">
<div align="center">半透明</div>
</td>
</tr>
</table>
方法二:
<table border="1" width="100" height="62" class="alpha" bgcolor="#F2A664" style="filter:Alpha(Opacity=50)" >
<tr>
<td width="100%" height="62">
<div align="center">半透明!</div>
</td>
</tr>
</table>

用css或者用图片填充(渐变效果)