zoukankan      html  css  js  c++  java
  • ie10兼容问题 -- 将div定位absolute在图片img上面,导致div点击事件无效

    ie10兼容问题:

    将div定位absolute在图片img上面,发现div若不加背景色,导致div点击事件(任何事件)无效。

    <div class="paper-box">
        <div class="red-paper">
           <img class="company-uk-packet" src="./images/uk-bag.png" alt="">
        </div>
        <div class="hand-hot"></div>
    </div>

    解决办法:

    1、给div本身加透明背景色(前提是该div里没有内容,否则内容也会被透明)

    .hand-hot{
        position: absolute;
        220px;
        height: 54px;
        bottom:22px;
        left:102px;
        cursor: pointer;
        background: #fff;
        opacity: 0;
    }

    2、将img换成背景图

    .red-paper{
        430px;
        height: 430px;
        background: url('../images/uk-bag.png') no-repeat center center;
    }
    .hand-hot{
        position: absolute;
        220px;
        height: 54px;
        bottom:22px;
        left:102px;
        cursor: pointer;
    }
  • 相关阅读:
    接水问题
    几种走法
    过河卒

    计数问题
    Java和C或C++的数据类型对照表
    记一次在家办公远程公司数据库的解决方案
    java nio 笔记
    mysql绿色版安装 遇到的问题
    mysql绿色版安装
  • 原文地址:https://www.cnblogs.com/juewuzhe/p/11975264.html
Copyright © 2011-2022 走看看