百度登录框的动态切换效果如何实现呢?本文主要介绍jquery实现百度登录框的动态切换效果,需要的朋友可以参考下,希望能帮助到大家。
点击右下角图片进行状态切换,效果图
nbsp;html>百度登录框 *{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; } .inputp { 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; } .togglep1,.togglep2 { 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; }
登录百度账号
X
登录后复制
可以使用以下方式登录
手机扫描,安全登录
请使用手机百度app扫描登录
$(document).ready(function(){ /*这是一个自定义的函数,作用是设置class1类为隐藏,class2类显示*/ function showp(class1,class2){ $(class1).css(“display”,”none”); $(class2).css(“display”,”block”); } /*给右下角的图标设置点击事件*/ $('.togglep1').click(function(){ showp(“.choice1″,”.choice2″); }) $('.togglep2').click(function(){ showp(“.choice2″,”.choice1″); }) /*给右上角的关闭按钮设置点击事件*/ $(“#close”).click(function(){ $(“.wrap”).css(“display”,”none”); }) })
相关推荐:
如何制作百度登录框架
原生js实现可拖动的登录框效果
如何用CSS3制作一个漂亮的登录框_html/css_WEB-ITnose
以上就是百度登录框的动态切换效果实现方法的详细内容,更多请关注【创想鸟】其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。
发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2791098.html