zoukankan      html  css  js  c++  java
  • JS张开收缩图片

    <!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>
        <title></title>
        <style type="text/css"> 
        .image
        {
            400px;
            height:300px;
            border:1px solid blue;
            display:none;
            }
         .divFrame
         {
             260px; border:solid 1px  #666; font-size:10pt;
             }
         .divTitle
         {
             background-color:#eee; padding:5px;
             }
         .dicContent
         {
             padding:5px;
             display:none;
             }
         .divCurrColor
         {
             background-color:Red;
             }
        </style>
        <script src="jquery-1.9.1.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(function () {
                $('#img1').addClass('image');
                $('#Button1').click(function () {
                    $('#img1').show(5000);
                })
                $('#Button2').click(function () {
                    $('#img1').hide(5000);
                })
                $('#Button3').click(function () {
                    $('#img1').fadeIn();
                })
                $('#Button4').click(function () {
                    $('#img1').fadeOut();
                })
                $('.divTitle').click(function () {
                    $(this).addClass('divCurrColor').next('.dicContent').css('display', 'block')
                })


            })        
        </script>
    </head>
    <body>
    <img id="img1" src="images/2.jpg" />
    <input value="展示图片" id="Button1" type="button" />
    <input value="收缩图片" id="Button2" type="button" />
    <input value="快速展示图片" id="Button3" type="button" />
    <input value="快速收缩图片" id="Button4" type="button" />
    <div class="divFrame">
    <div class="divTitle">主题</div>
    <div class="dicContent">
    <a href="#">连接一</a><br />
    <a href="#">连接二</a><br />
    <a href="#">连接三</a>
    </div>
    </div>
    </body>
    </html>

  • 相关阅读:
    Licode—基于webrtc的SFU/MCU实现
    从入门到进阶|如何基于WebRTC搭建一个视频会议
    Web前端的WebRTC攻略(一)基础介绍
    WebRTC入门与提高1:WebRTC基础入门
    RTCStartupDemo:一款极其简单的 WebRTC 入门项目
    WebRTC 开发实践:如何实现 SFU 服务器
    maven~生成spotbug文档
    spotbugs~lombok生成的Date属性引起的EI_EXPOSE_REP问题
    es~通过ElasticsearchTemplate进行聚合~Nested嵌套聚合
    es~通过ElasticsearchTemplate进行聚合~嵌套聚合
  • 原文地址:https://www.cnblogs.com/duanlinlin/p/3024358.html
Copyright © 2011-2022 走看看