-
$(function(){ $("#type dd a").bind("click",function(){ $("#type dd a ").attr("class",""); $(this).attr("class","selected"); }) })查看全部
-
解决 window.onload只能加载一个函数问题查看全部
-
function show(index){ var dd=document.getElementById("type").getElmentsByTagName("dd"); for(var i=0;i<dd.length;i++){ if(i==index){ dd[i].className="selected"; }else{ dd[i].className=null; } } }查看全部
-
$("#type dd").click(function(){ $(this).siblings().removeClass("selected"); if($(this).hasClass("selected")){ $(this).removeClass("selected"); } else{ $(this).addClass("selected"); } })查看全部
-
使用label标签时,用户可以通过点击按钮后面的文字对复选框进行选中。 id标签必须和label for值相同。例如: <input type="checkbox" name="typelist" id="list"><lable for="list"> id最好是有含义的英文或者汉语拼音,不要是1、2、3...这样查看全部
-
知识点概述1查看全部
-
function show(index){ var dd=document.getElementById("type").getElmentsByTagName("dd"); for(var i=0;i<dd.length;i++){ if(i==index){ dd[i].className="selected"; }else{ dd[i].className=null; } } }查看全部
-
<link rel="stylesheet" type="text/css" href="public.css"> <style> .body{font: 12px/22px "微软雅黑";} a{color: #000000; text-decoration: none;} .type{width: 400px; height: 32px; border: 1px solid #dfdfdf; margin: 30px auto;} .type dl{height: 32px; line-height: 32px; padding-left: 15px;} .type dt{float: left;} .type dd{float: left; margin: 0 10px 0 8px;} .type dd a{display: block; position: relative; padding-left: 23px;} .type dd a:hover{color: #cc0000; text-decoration: underline;} .type dd b{width: 20px; height: 20px; background: url(radiobutton.gif) no-repeat -14px -18px; display: block; position: absolute; top: 6px; left: 0;} /*鼠标移进的雪碧图*/ .type dd a:hover b{background-position: -14px -118px;} /*默认选中的雪碧图*/ .type .selected b, .type .selected a:hover b{background-position: -14px -218px;} </style> <body> <div class="type"> <dl> <dt>配送类型:</dt> <dd class="selected"><a href="#"><b></b>全部</a></dd> <dd><a href="#"><b></b>京东配送</a></dd> <dd><a href="#"><b></b>第三方配送</a></dd> </dl></div></body>查看全部
-
cursor:pointer:变成手势查看全部
-
技巧: position:absolute;left:50%;top:50%; margin:-163px 0 0 -250px;查看全部
-
transition: padding .25s 可以使padding实现0.25s的过滤。查看全部
-
让页面同时加载多个函数查看全部
-
js....查看全部
-
border-width:1px 0;查看全部
-
<input type="checkbox" id="shucai"><lable for="shucai">查看全部
举报
0/150
提交
取消