登錄樣式問題
<head> <meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> <title>無標(biāo)題文檔</title> <style?type="text/css"> *{font-size:12px;} #head{?font-size:12px;?padding:6px?0?0?10px;} #loginbox{width:300x;?height:150px;?background:#eee;?border:1px?solid?#ccc;?position:absolute;left:50%;top:50%;;?margin-left:-150px;?margin-top:-75px;display:none;} #loginbox?p{?height:20px;?border-bottom:1px?sold?red;?font-size:12px;?font-weight:bold;?padding:6px?0?0?5px;} #close{?cursor:pointer;?width:14px;?height:14px;?position:absolute;?right:4px;?top:6px;} </style> <script?type="text/javascript"> window.onload=function(){ var?login=document.getElementById("login"), ????close1=document.getElementById("close"), ????loginbox=document.getElementById("loginbox"); //添加事件 function?addEvent(ele,type,hander){ if(ele.addEventListener){ ele.addEventListener(type,hander,false); }else?if(ele.attachEvent){ ele.attachEvent("on"+type,hander); }else{ ele["on"+type]=hander; } } function?showloginbox(){ loginbox.style.display="block"; } function?hideloginbox(){ loginbox.style.display="none"; } addEvent(login,"click",showloginbox); addEvent(close1,"click",hideloginbox); } </script> </head> <body> <div?id="head"> 親,您好! <input?id="login"?type="button"?value="登錄"/> </div> <div?id="loginbox"> <p>用戶登錄</p> <span?id="close">a</span> </div> </body>
登錄彈出框的樣式怎么是,下圖,是哪錯(cuò)了?
2016-07-17
width:300px丟了p,寫成了300x,所以寬度沒有起作用
后面還寫錯(cuò)一個(gè)solid