js的问题
桦随枫落 2017-12-13 11:42:52 <!DOCTYPE html>
<html class="html">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>Mess_board_home_page</title>
<link rel="stylesheet" type="text/css" href="../css/Mess_board_home_page.css">
<link rel="stylesheet" type="text/css" href="../css/iconfont_one.css">
<link rel="stylesheet" type="text/css" href="../css/iconfont_two.css">
<script type="text/javascript" src="../js/Mess_board_home_page.js"></script>
</head>
<body class="body">
<div class="left">
<div class="left_top">
<i class="iconfont icon-arrow-left"></i>
<i class="iconfont icon-dianyuan"></i>
<img class="Head_portrait" src="../images/Head_portrait.png" />
<div class="nickname">昵称:</div>
</div>
<div class="left_middle">
<i class="iconfont icon-addfriend"></i>
<div class="Grouping">分组</div>
<div class="menu">
<div class="Special_attention">
<form name="登录界面method="POST" ><div id="abc" onclick="ma(event)"><input id="Special_attention_" type="submit" value="特别关注"><i class="iconfont icon-arrow-right"></i></div>
<a href="#" id="ss"><div id="Special_attention_son" class="show"><img class="Special_attention_pic" src="../images/Special_attention_Head_portrait.png" /><input class="Special_attention_son_" type="submit" value="好友昵称:"></form>
</div></a>
</div>
</div>
</div>
</div>
</body>
</html>
css
*{
margin:0;
padding: 0px;
}
@font-face{
font-family:FZJZJW;
src:url(../font/[FZJZJW].ttf);
}
.html{
height:100%;
}
.body{
height:100%;
display:flex;
}
.left{
min-height:768px;
width: 285px;
background-color:#dcb25b;
position:relative;
overflow:hidden;
}
.left_top{
height:260px;
width:285px;
position:absolute;
}
.Head_portrait{
position:absolute;
top:97px;
left: 85px;
}
.nickname{
font-size: :18px;
font-family:微软雅黑;
color:#fcf9f9;
position:absolute;
bottom: 5px;
left:90px;
}
.left_middle{
width:237px;
height:491px;
background-color:#ebd19f;
position:absolute;
top:260px;
left:24px;
}
.Grouping{
width:181px;
color:#28313f;
font-size:18px;
font-family: 微软雅黑;
border-bottom: solid 2px #ceaf70;
position:absolute;
top:101px;
left:32px;
}
.menu{
width:176px;
height:148px;
position:relative;
top:143px;
left: 32px;
font-size:18px;
font-family: 微软雅黑;
color:#28313f;
}
.show{
display:none;
}
.Special_attention{
position:relative;
margin-bottom:24px;
}
#Special_attention_{
background-color:#ebd19f;
border:none;
font-size: 18px;
font-family: 微软雅黑;
padding:6px 101px 6px 0px;
outline:none;
}
#ss{
width:182px;
height:40px;
}
#Special_attention_son{
width:178px;
height:36px;
border: solid 2px #fbf1dc;
border-radius:5px;
position:relative;
top:11px;
z-index:999;
}
.Special_attention_pic{
position:absolute;
left: 5px;
top:5px;
}
.Special_attention_son_{
background-color:#ebd19f;
border:none;
z-index:6;
padding:11px 85px 8px 37px;
outline:none;
}
js
'use strict';
function ma(e){
e.preventDefault();
document.getElementById("Special_attention_son").classList.toggle("show");
}
那个特别关心那个子菜单点击自己也隐藏,这是为什么,还有我a标签怎么只选择了img和边框??急救