前端之家收集整理的这篇文章主要介绍了
HTML 为元素添加一些透明度的简单方法,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
感兴趣HTML 为元素
添加一些透明度的简单
方法的小伙伴,下面一起跟随编程之家 jb51.cc的小编来看看吧。<br>
<!------>
<!-- a little bit css here: -->
<style type="text/css" media="all">
td { vertical-align: top; }
#table {
margin: 0 auto;
width: 300px;
}
.red_Box {
width: 100px;
height: 100px;
background-color: #7A1417;
}
</style>
<!-- 512-笔记网 jb51.cc -->
<!-- a table with some images and divs -->
<table border="0" cellpadding="5" cellspacing="2" id="table">
<tr>
<td valign="top">
90 % opacity<br/>
<img src="/lab/context_free/t008.png"
style="filter: Alpha(opacity=90); opacity: .9;" />
</td>
<td>
50 % opacity<br/>
<img src="/lab/context_free/t008.png"
style="filter: Alpha(opacity=50); opacity: .5;" />
</td>
<td>
20 % opacity<br/>
<img src="he/lab/context_free/t008.png"
style="filter: Alpha(opacity=20); opacity: .2;" />
</td>
</tr>
<tr>
<td>
90 % opacity<br/>
<div class="red_Box"
style="filter: Alpha(opacity=90); opacity: .9;" /></div>
</td>
<td>
50 % opacity<br/>
<div class="red_Box"
style="filter: Alpha(opacity=50); opacity: .5;" /></div>
</td>
<td>
20 % opacity<br/>
<div class="red_Box"
style="filter: Alpha(opacity=20); opacity: .2;" /></div>
</td>
</tr>
</table>
原文链接:https://www.f2er.com/html/527507.html