代码如下:
找到</head>在上面加入:- <script type="text/javascript">
- <!--
- function SWLogin()
- {
- oLogin = document.getElementById("Login");
- oIEBackground = document.getElementsByTagName("body");
- oCSS3Background = document.getElementById("LoginBackground");
- if (oLogin.style.display == "block")
- {
- oLogin.style.display = "none";
- oIEBackground[0].style.filter = "";
- oCSS3Background.style.opacity = "";
- }
- else
- {
- oLogin.style.display = "block";
- oIEBackground[0].style.filter = "alpha(opacity=6)";
- oCSS3Background.style.opacity = "0.06";
- }
- }
- //-->
- </script>
复制代码 找到<body>在下面加入:- <div id="LoginBackground">
复制代码 然后在你需要连接的地方写上- <a href="#" onclick="javascript:SWLogin()">登录</a>
复制代码 然后在下面继续加代码:- <div id="Login" style="width: 200px; height: 120px; padding: 0px; margin: 0px; position: absolute; top:1%; left:1%; display: none; text-align: center;">
- <div id="topLogin">
- <script src="{S_URL}/index.login-1.php?rand={eval echo rand(1, 999999)}" type="text/javascript" language="javascript"></script>
- </div>
- </div>
复制代码 在找到</body>的上面加入:CSS书写如下(如果是使用官方默认的,可以不书写表单通用样式,只需书写用户相关代码:
适合(个人制作风格)- /*表单通用样式-----------------------------------------------------------------------------------表单通用样式*/
- form { margin: 0; }
- input, textarea, button, select { font: 1em Arial, Helvetica, sans-serif; }
- button { height: 1.8em; padding: 0 0.3em; background: #E2F0F9; cursor: pointer; border: 1px solid;
- border-top-color: #C9E3F0; border-right-color: #86B9D6; border-bottom-color: #86B9D6; border-left-color: #C9E3F0; }
- label { cursor: pointer; margin-right: 0.5em; }
-
- /*-----------------------------------------------------------------------------------用户相关*/
- /*登陆*/
- .inputLogin{font-family:Tahoma,Arial,"宋体";font-size:12px;line-height:15px;color:#333;height:14px;border:1px #CCCCCC solid;margin-bottom:2px;}
- .resiveWord{font-weight:bold;}
- .resiveButt{margin:0 15px 0 10px;}
- .resiveInput{margin-top:2px;}
- #topLogin{width:950px;height:26px;margin:0 auto;padding:2px 10px 0 10px;background:#F9F9F9;border-top:none;}
- #topLogin div{line-height:25px;float:left;}
- .end_margin_a{padding-right:38px;}
- .end_margin_b{margin-right:48px;}
- .userBar li{float:left;}
- .userBar span{font-family:"宋体";color:#06F;}
- .userBara{color:#06F;}
- #topLogin{border:1px #90A4A8 solid;}
复制代码 OK完工!
下面是登入器和效果图!
[ 本帖最后由 SSAY 于 2007-10-15 14:18 编辑 ] |