下面我们来一步一步改削!
首先在index.html中删失踪原本的上岸代码,在头部文件head.html插手以下新的代码:
<div class="header_top">
<div class="w960 center">
<span class="time" id="time">
}
<table border="0" align="center" >
<tr><td>
<div id="_userlogin">
<div class="userlogin">
<div class="toplinks"><a href=""onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('{dede:global.cfg_basehost/}');">设为首页</a> | <a href="http://www.zhuojie.net/?/web/2012/0706/javascript:window.external.AddFavorite('{dede:global.cfg_basehost/}','{dede:global.cfg_webname/}')">插手保藏</a> | <a href="http://www.zhuojie.net/?/web/2012/0706/{dede:global.cfg_cmsurl/}/data/sitemap.html" target="_blank">网站导航</a> | <a href="http://www.zhuojie.net/?/web/2012/0706/http://www.zhuojie.net/?">联系我们</a></div>
<input type="hidden" name="fmdo" value="http://www.zhuojie.net/?/web/2012/0706/login" />
color:#676767;
验证码:<input type="text" name="vdcode" size="8" class="ipt-txt" />
<input type="hidden" name="dopost" value="http://www.zhuojie.net/?/web/2012/0706/login" />
<div class="fb">用户名:<input type="text" name="userid" size="18" class="ipt-txt" />
width:960px;
密码:<input type="password" name="pwd" size="18" class="ipt-txt" />
<img align="center" src="/userfiles/Auto/20121226" />
<button type="submit" class="btn-1">登录</button>
<a href="http://www.zhuojie.net/?/web/2012/0706/{dede:global.cfg_memberurl/}/index_do.php?fmdo=user&dopost=regnew">注册帐号</a> <a href="http://www.zhuojie.net/?/web/2012/0706/{dede:global.cfg_memberurl/}/resetpassword.php">健忘密码?</a>
</div>
</div>
float:right;
}
color:#333333;
<!-- /userlogin -->
<script language="javascript" type="text/javascript">CheckLogin();</script>
$("a[_for]").mouseover(function(){
</td></tr></table>
<script language="javascript" type="text/javascript"></span>
</div>
width:960px;
</div>
.header{
});
.ipt-txt{
margin:auto;
HTML代码此刻我们已经有了,下面把膳缦沔代码赌暌姑到的CSS样式完美了:
/*---------- head ---------*/
}
.header_top{
height:32px!important;
width:100%;良多做网站的人在做门户资讯网站的时辰,都喜缓洗砦筅首页顶部的位置来个横向的会员上岸。而dede的会员上岸则是在右边的。那到底要若何来实现这个功能呢?请先看效不美观图。
line-height:32px;
background:url(../images/top_bg.gif) repeat-x;
}
.center{
margin:0px auto;
}
.w960{
/*position:relative;*/
}
.header_top .time{
float:left;
padding-left:10px;
overflow:hidden;
}
.header_top .toplinks{
text-align:right;
}
<form name="userlogin" action="{dede:global.cfg_memberurl/}/index_do.php" method="POST">
.header_top .toplinks a{
margin:0 5px;
}
.header .top{
height:31px;
clear:both;
overflow:hidden;
</script>
margin-top:10px;
}
.header .title{
float:left;
}
.header .title h1 a{
overflow:hidden;
height:58px;
display:block;
下在是CSS中呈现的图片
}
.header .banner{
width:434px;
height:55px;
-->
margin-left:20px;
overflow:hidden;
$(; $("a[_for=flink_1]").mouseover();
</form>
width:100px;
float:right;
此刻都全了,再看看效不美观。
border:1px #CFCFCF solid;
}
.fb{
width:386px;
}
var taget_obj = document.getElementById('_userlogin');
.btn-1{
background: url("../images/comm-bt.gif") no-repeat scroll 0 0 transparent;
border: medium none;
width: 70px;
cursor: pointer;
height: 24px;
letter-spacing: 1px;
line-height: 25px;
overflow: hidden;
HTML代码和CSS都有了,此刻显示是没问题了,但要正常登入,还少一些JS文件要加载:
<script language="javascript" type="text/javascript" src="http://www.zhuojie.net/?/web/2012/0706/{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script>
<!--
overflow:hidden;
<input type="hidden" name="keeptime" value="http://www.zhuojie.net/?/web/2012/0706/604800" />
$(function(){
$(this).parents().children("a[_for]").removeClass("thisclass").parents().children("dd").hide();
$(this).addClass("thisclass").blur();
$("#"+$(this).attr("_for")).show();
});
}
function CheckLogin(){
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("{dede:global.cfg_cmspath/}/member/ajax_loginsta.php");
DedeXHTTP = null;
color: #585858;
下载地址:DEDE5.7横向登入图片.zip
原创文章如转载,请注明:转载自逸诚科技
本文链接:http://www.zhuojie.net/?/post/108.html