select_sex.html
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_782635_cvxdd8r2ec.css"/>
<link rel="stylesheet" href="css/select_sex.css"/>
<script src="js/base.js"></script>
<title>选择性别</title>
</head>
<body>
<div class="container">
<div class="sex_chose">
<div class="girl">
<img src="img/girl.png" alt=""/>
</div>
<div class="boy">
<img src="img/boy.png" alt=""/>
</div>
</div>
<div class="select_sex">
<p class="woman">女生</p>
<p class="man">男生</p>
</div>
<div class="select">
<p class="sure">确定</p>
<P class="cancel">取消</P>
</div>
</div>
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script>
$(".woman").click(function(){
$(this).css("color","#F37A7B");
$(this).css("background","rgba(243,122,123,0.6)");
$(this).siblings(".man").css("color","#fff");
$(this).siblings(".man").css("background","rgba(57,144,245,1)")
})
$(".man").click(function(){
$(this).css("color","#3990F5");
$(this).css("background","rgba(57,144,245,0.25)");
$(this).siblings(".woman").css("color","#fff");
$(this).siblings(".woman").css("background","rgba(243,122,123,1)")
})
//取消
$(".cancel").click(function(){
window.history.back()
})
</script>
</body>
</html>