CSS3+HTML5+JavaScript:个人相册网站实现

一.网站要求

  • 登录,注册页面的邮箱,密码,项目使用正则表达式,格式错误时提醒。
  • 登录界面进入时旋转效果。
  • 注册信息要和登录信息一致,否则不予登录。
  • 数据传输可以不链接数据库。
  • 个人相册实现3D旋转效果,鼠标移动到照片时,动画暂停,鼠标移开时,动画继续。

二.效果展示

登录页面:在这里插入图片描述
注册页面:
在这里插入图片描述
个人相册页面(3D旋转效果):
在这里插入图片描述

三.设计思路

  • 数据传输通过localStorage或sessionStorage本地缓存实现

注意:在IE8以上的IE版本才支持localStorage这个属性。localStorage属于永久性存储,如果存储内容多的话会消耗内存空间,会导致页面变卡。

  • 退出时清空缓存

四.所有代码如下

登录页面代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <style>
        @keyframes move {
     
            100%{
     
                transform: rotateY(360deg);
            }
        }
        body {
     
            margin: 0px;
            padding: 0px;
        }
        input {
     
            border-style:none none solid none;
            font-size: 17px;
            filter:alpha(opacity=20);
            opacity:0.3;
        }
        a {
     
            font-size: 17px;
            color:rgb(207, 48, 48);
        }
        button {
         
            width: 150px;
            height: 30px;
            border-radius: 10%;
            background-color: #e05858;    
            border: none;    
            color: white;      
            text-align: center;    
            text-decoration: none;    
            display: inline-block;    
            font-size: 15px;    
            margin: 4px 2px;    
            cursor: pointer;    
            -webkit-transition-duration: 0.4s;    
            transition-duration: 0.4s;}
            button:hover {
         
                box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19);
            }
        #bg {
     
            background-image: url(1.jpg);
            position:fixed;
            top: 0;
            left: 0;
            width:100%;
            height:100%;
            min-width: 250px;
            z-index:-10;
            zoom: 1;
            background-color: #fff;
            background-repeat: no-repeat;
            background-size: cover;
            -webkit-background-size: cover;
            -o-background-size: cover;
            background-position: center 0;
        }
        #div1 {
     
	    	margin:0 auto;
            position: relative;
            top:30px;
            width: 600px;
            height: 600px;
            border-radius: 50%;
            filter:alpha(opacity=50);
            opacity:0.5;
            animation:move 2s linear 1s 1 alternate;
            background-color: rgb(255, 255, 255);
        }
        #p1 {
     
            font-size: 30px;
            color: black;
            font-weight: 600;
        }
        .p2 {
     
            font-size: 17px;
            color: rgb(119, 115, 115);
            font-weight: 700;
        }
        #div2 {
     
            float:left;
            text-align: center;
            width: 450px;
            height: 450px;
            position: relative;
            top:-75%;
            animation: move 2s linear 1s 1 alternate;
            left:33.5%;
        }

    </style>
</head>
<body>
    <div id="bg">
        <div id="div1"></div>
        <div id="div2">
            <p id="p1">立即登录</p>
            <p class="p2">邮箱</p>
            <input type="text" placeholder="请输入邮箱" id="email"/>
            <p class="p2">密码</p>
            <input type="password" placeholder="密码长度至少为六位" id="passworld"/>
            </br>
            <a href="#" id="a">忘记密码?</a>
            </br></br>
            <button onclick="denlu()
  • 11
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

忙碌了一天的白师傅

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值