一些基础知识

来源:互联网 发布:linux 获取绝对路径 编辑:程序博客网 时间:2024/04/30 12:37
parents 上一级
siblings 同级 除了他所有的同级都被选中
children 下一级  children("p.1")   从1开始
first(); 首个元素
last()最后一个元素
filter(“.hh”) 带有hh的元素
not(“.hh”) 不带有hh的元素
eq(1)  从0开始
stop(a,b); a是否停止 b立即完成当前动画  无参数只停止当前,一个参数停止所有动画


一个是next()、prev()、parents()、find()
第一个下一个元素
第二个是匹配元素的上一个元素
第三个是匹配元素的父级元素
第四个是,在匹配元素中查找一个指定的元素




img {
max-width: 100%;
height: auto;
width:auto\9; /* ie8 */
-ms-interpolation-mode:bicubic;/*为了照顾ie图片缩放失真*/
}
三角
posiion:assolute;
margin-left:20px;
width:0;
height:0;
border-left:8px solid transparent;
border-right:8px solid transparent;
border-bottom:7px solid white; 


调背景
background-position:-314px -10px;


透明
opacity:0.8; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80);


圆角,用于轮播序号
#focus .btn span {display:inline-block; _zoom:1; width:15px; height:15px; font-size:12px; margin-left:5px; line-height:15px; cursor:pointer;  background:#fff; border-radius:8px; padding-left:-5px; text-align:center; border:1px solid #ebebeb; font-weight:bold;}


$('.hotlist li').mouseover(function(){  
var source=$(this).children().find(".mhimg").attr("src");
$('#mhh').attr("src",source);


  })


   //右侧margin值控制
  var fLi = $('.spacelist li'),
                  len = fLi.length;
          for (var i = 0; i < len; i++) {
              if (i % 5 == 4) {
                  $(fLi).eq(i).css({ "margin-right": "0px" });
              }
          }
选中切换css
 $(".zonghesort_left li").click(function () {
             $(".zonghesort_left li").removeClass("dq");
             $(this).addClass("dq");
         });




//全选
    $(".checkall").click(function () {
        $("input[type='checkbox']").prop("checked", $(this).prop("checked"));
    });




<input title="可输入拼音或汉字搜索" class="searchtxt" style="color: rgb(204,204,204);" 
onfocus="if (this.value=='可输入拼音或汉字搜索') {this.value=''}" onblur="if (this.value==''){ this.value='可输入拼音或汉字搜索';}" type="text" value="可输入拼音或汉字搜索"/>


<input type="text" class="text" value="请输商品或店铺" onblur="if (this.value==''){ this.value='请输商品或店铺';this.style.color='#ccc';}else{this.style.color='#333';}" onfocus="if (this.value=='请输商品或店铺') {this.value='';this.style.color='#333';}" title="请输商品或店铺" />


//禁止返回
<script type="text/javascript">
       // window.history.forward(1);
</script>
0 0
原创粉丝点击