weixin_36367867 2016-10-11 09:39 采纳率: 0%
浏览 1060

为什么的图片点击隐藏效果没有实现,是哪里出了问题,求大神解答!

 <!DOCTYPE html>
<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">
body{ margin:0; padding:0;}
.total{ width:960px; margin:0 auto;}
.main,.footer,.head{ font-size:30px;}
.head{  height:100px; background:#ccc}
.main{ height:485px; background:#FCC}
.footer{ height:50px; background:#9CF}
/*广告样式*/
.pic{
    width:100%;
    height:100%;
    background-color:rgba(0,0,0,0.5);
    position:fixed;
    top:0px;
    right:0px;  
    }
.adv{
    position:fixed;
    top:60px;
    left:360px; 
    }   
</style>

</head>

<body>
<!--应用jQuery-->
<script type="text/javascript" src="js/jquery-3.0.0.js"></script>
<script type="text/javascript">
    $(".adv").click(function(){
        $(".adv").hide();
        $(".pic").hide();   
     });
</script>
<!--悬浮广告-->
    <div class="pic">
        <img src="img/103-160Q509544OC.jpg" class="adv">        
    </div>


<div class="total">
    <div class="head">jquery-2.1.4 (注!jquery-2.0以上版本不再支持IE 6/7/8)</div>
    <div class="main">jquery-2.1.4 (注!jquery-2.0以上版本不再支持IE 6/7/8)</div>
    <div class="footer">jquery-2.1.4 (注!jquery-2.0以上版本不再支持IE 6/7/8)</div>
</div>

</body>
</html>
  • 写回答

10条回答 默认 最新

  • 当作看不见 2016-10-11 09:51
    关注

    你这个图片没有这个类,选择器没有选中

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题