点击右下角图片进行状态切换,效果图
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>百度登录框</title>
<style type="text/css">
*{margin: 0;padding: 0;}
body
{
font-size: 12px;
}
a
{
text-decoration: none;
color: #2647CB;
}
a:hover
{
text-decoration: underline;
color: red;
}
.wrap
{
width: 390px;
height: 450px;
margin: 50px auto;
border: 1px solid #8A8989;
position: relative;
}
.main
{
width: 350px;
height: 400px;
margin: 0 auto;
}
.header
{
width: 100%;
height: 50px;
line-height: 50px;
background-image: url(images/foot.png);
background-color: rgb(247,247,247);
background-repeat: no-repeat;
}
.header h3
{
display: inline-block;
line-height: 50px;
margin-left: 50px;
}
.header span
{
display: inline-block;
float: right;
margin: auto 15px;
font-size: 30px;
}
.inputDiv
{
display: block;
width: 350px;
height: 40px;
margin: 10px auto;
}
.phoneIn
{
display: inline-block;
float: right;
font-size: 14px;
background-image: url(images/phone.png);
background-repeat: no-repeat;
padding-left: 20px;
margin: 30px 0px 10px 0px;
}
.smBtn
{
background: #2066C5;
color: white;
font-size: 18px;
font-weight: bold;
height: 50px;
border-radius: 4px;
}
.smBtn:hover
{
background: #4067EE;
}
.pull-right
{
display: inline-block;
float: right;
}
.other
{
width: 350px;
padding-top: 50px;
margin: 0 auto;
}
.toggleDiv1,.toggleDiv2
{
position: absolute;
right: 0;
bottom: 0;
z-index: 1000;
}
.weima
{
text-align: center;
padding-top: 50px;
width: 390px;
height: 400px;
}
.weima p
{
line-height: 50px;
}
.choice2
{
display: none;
}
#close:hover
{
cursor: pointer;
color: blue;
}
</style>
</head>
<body>
<!-- 账号密码登录 -->
<div class="wrap">
<div class="header">
<h3>登录百度账号</h3>
<span id="close" title="关闭">X</span>
</div>
<div class="choice1">
<div class="main">
<a href="" class=" rel="external nofollow" rel="external nofollow" rel="external nofollow" phoneIn">短信快捷登录</a>
<form action="">
<input type="text" class="inputDiv" placeholder="手机/邮箱/账号">
<input type="password" class="inputDiv" placeholder="请输入登录密码">
<p class="inputDiv">
<input type="checkbox" value="checked" checked="checked"><label for="">下次自动登录</label>
<a href="" class=" rel="external nofollow" rel="external nofollow" rel="external nofollow" pull-right" >登录遇到问题</a>
</p>
<input type="submit" value="登录" class="inputDiv smBtn">
<a href="" class=" rel="external nofollow" rel="external nofollow" rel="external nofollow" pull-right" >立即注册</a>
</form>
<div class="other">
<p>可以使用以下方式登录</p>
<a href=""><img src=" rel="external nofollow" rel="external nofollow" images/qq.png" alt=""></a>
<a href=""><img src=" rel="external nofollow" rel="external nofollow" images/wb.png" alt=""></a>
</div>
</div>
<div class="toggleDiv1">
<img src="images/small2wm.png" alt="">
</div>
</div>
<!-- 二维码登录 -->
<div class="choice2">
<div class="weima">
<p>手机扫描,安全登录</p>
<img src="images/2weima.png" alt="">
<p>请使用手机百度app扫描登录</p>
</div>
<div class="toggleDiv2">
<img src="images/cpt.png" alt="">
</div>
</div>
</div>
</body>
<!-- 导入jquery文件 -->
<script type="text/javascript" src="jquery-3.1.1.min.js"></script>
<script>
$(document).ready(function(){
/*这是一个自定义的函数,作用是设置class1类为隐藏,class2类显示*/
function showDiv(class1,class2){
$(class1).css("display","none");
$(class2).css("display","block");
}
/*给右下角的图标设置点击事件*/
$('.toggleDiv1').click(function(){
showDiv(".choice1",".choice2");
})
$('.toggleDiv2').click(function(){
showDiv(".choice2",".choice1");
})
/*给右上角的关闭按钮设置点击事件*/
$("#close").click(function(){
$(".wrap").css("display","none");
})
})
</script>
</html>
以上所述是小编给大家介绍的jQuery实现百度登录框的动态切换效果,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
# jquery
# 登录框
# 动态切换
# jQuery实现鼠标拖拽登录框移动效果
# JQuery Mobile 弹出式登录框的实现方法
# jquery中dom操作和事件的实例学习 仿yahoo邮箱登录框的提示效果
# jquery鼠标放上去显示悬浮层即弹出定位的div层
# jquery实现鼠标悬浮停止轮播特效
# jquery悬浮提示框完整实例
# jquery-tips悬浮提示插件分享
# js点击出现悬浮窗效果不使用JQuery插件
# 使用jQuery UI的tooltip函数修饰title属性的气泡悬浮框
# jquery+CSS实现悬浮登录框遮罩
# 小编
# 在此
# 这是一个
# 请使用
# 给大家
# 请输入
# 自定义
# 可以使用
# 所述
# 给我留言
# 感谢大家
# 自动登录
# 疑问请
# 有任何
# 下次
# position
# relative
# main
# height
# wrap
相关文章:
如何挑选优质建站一级代理提升网站排名?
如何快速搭建高效服务器建站系统?
香港服务器租用费用高吗?如何避免常见误区?
如何破解联通资金短缺导致的基站建设难题?
创业网站制作流程,创业网站可靠吗?
建站之星ASP如何实现CMS高效搭建与安全管理?
建站主机与服务器功能差异如何区分?
外贸公司网站制作哪家好,maersk船公司官网?
深圳网站制作费用多少钱,读秀,深圳文献港这样的网站很多只提供网上试读,但有些人只要提供试读的文章就能全篇下载,这个是怎么弄的?
如何在万网开始建站?分步指南解析
移动端手机网站制作软件,掌上时代,移动端网站的谷歌SEO该如何做?
宝塔建站无法访问?如何排查配置与端口问题?
Swift中循环语句中的转移语句 break 和 continue
建站之星北京办公室:智能建站系统与小程序生成方案解析
香港网站服务器数量如何影响SEO优化效果?
制作网站建设的公司有哪些,网站建设比较好的公司都有哪些?
如何构建满足综合性能需求的优质建站方案?
建站之星好吗?新手能否轻松上手建站?
怎么将XML数据可视化 D3.js加载XML
广州网站制作的公司,现在专门做网站的公司有没有哪几家是比较好的,性价比高,模板也多的?
小米网站链接制作教程,请问miui新增网页链接调用服务有什么用啊?
高性能网站服务器部署指南:稳定运行与安全配置优化方案
如何快速查询网址的建站时间与历史轨迹?
建站主机类型有哪些?如何正确选型
常州企业网站制作公司,全国继续教育网怎么登录?
如何用免费手机建站系统零基础打造专业网站?
在线ppt制作网站有哪些,请推荐几个好的课件下载的网站?
建站主机无法访问?如何排查域名与服务器问题
小建面朝正北,A点实际方位是否存在偏差?
如何快速重置建站主机并恢复默认配置?
如何通过虚拟主机快速完成网站搭建?
如何注册花生壳免费域名并搭建个人网站?
建站上传速度慢?如何优化加速网站加载效率?
品牌网站制作公司有哪些,买正品品牌一般去哪个网站买?
专业企业网站设计制作公司,如何理解商贸企业的统一配送和分销网络建设?
天河区网站制作公司,广州天河区如何办理身份证?需要什么资料有预约的网站吗?
七夕网站制作视频,七夕大促活动怎么报名?
香港代理服务器配置指南:高匿IP选择、跨境加速与SEO优化技巧
建站之家VIP精选网站模板与SEO优化教程整合指南
建站之星下载版如何获取与安装?
建站VPS能否同时实现高效与安全翻墙?
小型网站制作HTML,*游戏网站怎么搭建?
如何在阿里云部署织梦网站?
高端建站如何打造兼具美学与转化的品牌官网?
如何用IIS7快速搭建并优化网站站点?
相亲简历制作网站推荐大全,新相亲大会主持人小萍萍资料?
建站之星logo尺寸如何设置最合适?
大连 网站制作,大连天途有线官网?
如何用y主机助手快速搭建网站?
如何通过WDCP绑定主域名及创建子域名站点?
*请认真填写需求信息,我们会在24小时内与您取得联系。