GitHub 博客园 Nanakon

☀【css】透明

让IE浏览器支持RGBA颜色
http://www.hujuntao.com/web/css/ie-browser-support-for-rgba-color.html

透明纯色背景

background: #000;
opacity: .8; /* 非 IE */
filter: alpha(opacity=80); /* IE */
/* 全部透明了 */
background: rgba(0,0,0,0.8); /* 非 IE */
filter: progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#CC000000', endColorstr='#CC000000'); /* IE */
/* 背景透明只 */

CSS 背景颜色属性值转换
http://www.linxz.de/demo/hex_color.html

图片透明度变化

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title></title>
    <style>
        .hover {
            opacity: .8;
            filter: alpha(opacity=80);
        }
    </style>
</head>
<body>
    <img onmousemove="this.className='hover'" onmouseout="this.className=''" src="http://29293.pic.baomihua.com/pic/5103065105981035073.jpg" width="392" height="220" alt="春哥">
</body>
</html>

IE6 支持透明 png

_background: none;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='scale', src='xxx.png');

posted on 2013-10-15 09:34  jzm17173  阅读(140)  评论(0编辑  收藏  举报

导航

轻音