zoukankan      html  css  js  c++  java
  • jq 获取下一个兄弟原素 下拉箭头旋转

    $('.weui-cells__title').on("click", function(e,rr){
                isshow=$(this).attr('isshow')
                if(isshow=='hide'){
                    $(this).find('.user-arrow').removeClass("rotate");
                    $(this).find('.user-arrow').addClass("rotate1");
                    
    
                    $(this).next().show(400); 
                    $(this).attr('isshow','show')
                }else{
                    $(this).find('.user-arrow').removeClass("rotate1");
                    $(this).find('.user-arrow').addClass("rotate");
                    $(this).next().hide(400); 
                    $(this).attr('isshow','hide')
                }
                
                 
            });
    
    
     
    <style type="text/css"> .user-arrow{ position:absolute; cursor:pointer; display:inline-block; margin-top:5px; float: right;  18px; height: 10px; } .rotate{ transform-origin:center center; //旋转中心要是正中间 才行 transform: rotate(180deg); -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -ms-transform: rotate(180deg); -o-transform: rotate(180deg); transition: transform 0.2s; //过度时间 可调 -moz-transition: -moz-transform 0.2s; -moz-transition: -moz-transform 0.2s; -o-transition: -o-transform 0.2s; -ms-transition: -ms-transform 0.2s; } .rotate1{ transform-origin:center center; transform: rotate(0deg); //返回原点 -webkit-transform: rotate(0deg); -moz-transform: rotate(deg); -ms-transform: rotate(0deg); -o-transform: rotate(0deg); transition: transform 0.2s; -moz-transition: -moz-transform 0.2s; -moz-transition: -moz-transform 0.2s; -o-transition: -o-transform 0.2s; -ms-transition: -ms-transform 0.2s; } </style> 
    
  • 相关阅读:
    java_方法
    Java switch case和数组
    Java流程控制语句
    Java变量和运算符
    Java对象和类
    Java基础语法
    Vmare12(虚拟机)安装Mac OS X Yosemite 10.10
    System Operations on AWS
    System Operations on AWS
    System Operations on AWS
  • 原文地址:https://www.cnblogs.com/weiyiyong/p/10620804.html
Copyright © 2011-2022 走看看