zoukankan      html  css  js  c++  java
  • 前台特效(1)鼠标改变透明度

    <!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/html; charset=utf-8" />
            <title>透明度</title>
            <style type="text/css">
                .one {
                    height: 790px;
                    width: 915px;
                    position: relative;
                }
                .one a {
                    display: block;
                    position: absolute;
                    left: 0px;
                    top: 0px;
                    height: 790px;
                    width: 915px;
                    z-index: 3;
                    /*兼容ie与firefox*/
                    opacity: 0.4;
                    filter:alpha(opacity=40);
                    background-color: #999999;
                }
                .one img {
                    z-index: 1;
    
                }
                .one a:hover {
                    opacity: 0;
                    filter:alpha(opacity=0);
                }
            </style>
        </head>
    
        <body>
            <div class="one">
                <img src="./1.jpg"/><a href="#"></a>
            </div>
        </body>
    </html>
  • 相关阅读:
    每日一题
    每日一题
    每日一题
    每日一题
    GitLab 部署
    Golang Web开发之Gin入门
    Golang消息队列之NSQ
    Golang操作Redis
    Golang操作MySQL
    Golang Json数据处理方法
  • 原文地址:https://www.cnblogs.com/longdidi/p/2946959.html
Copyright © 2011-2022 走看看