<!DOCTYPE html>
<html>
<head>
<style>
div
{
background-color:red;
opacity:0.5;
filter:Alpha(opacity=50); /* IE8 and earlier */
}
</style>
</head>
<body>
<div>This element's opacity is 0.5! Note that both the text and the background-color are affected by the opacity level!</div>
</body>
</html>
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。