首页 前端知识 基于HTML的项目网页网站的搭建(HTML CSS JavaScript)

基于HTML的项目网页网站的搭建(HTML CSS JavaScript)

2024-08-24 23:08:33 前端知识 前端哥 239 345 我要收藏

前言 (此项目为蔡徐坤的狂热粉丝网页)
1、网站结构设计
基于HTML的静态旅游项目通常包括以下页面:登录页面、首页、、交通住宿、联系我们等。这些页面通过链接相互关联,形成一个完整的网站结构。

2、网页布局与样式设计
使用CSS进行网页布局和样式设计,可以采用响应式设计,使网页在不同设备上具有良好的兼容性和视觉效果。同时,注重页面元素的排版和颜色搭配,提高用户体验。

3、动态效果与交互功能实现
通过JavaScript添加动态效果和交互功能,如图片轮播、导航栏下拉菜单、景点介绍页面的切换等。这些功能可以增强网页的趣味性和实用性,提高用户的浏览体验。

一、这是登录界面页面的开始

在登录之前也是可以注册的 

注册页面

点击注册之后就会提示注册成功

然后进入登录界面输入账号密码进入主页面 

主页面上部分

主页面下部分

 关于坤的页面

 加下来是个人博客页面

而且每一个图片下面都有另外的一张图片

 

 

在然后就是图片轮播形式 轮流播放蔡徐坤的帅照

以及最后的join页面

 

以及源代码

login.html

<!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" />
    <link rel="stylesheet" href="../css/login.css" />
    <script src="../js/wangye.js"></script>
    <title>登录</title>
  </head>
  <body>
    <div class="box">
      <div></div>
      <div class="pre-box">
        <h1>WELCOME</h1>
        <p>JOIN US!</p>
        <div class="img-box">
          <img src="../image/wuwu.gif" alt="" />
        </div>
      </div>
      <div class="register-form">
        <div class="title-box">
          <h1>注册</h1>
        </div>
        <div class="input-box">
          <input type="text" placeholder="用户名" />
          <input type="password" placeholder="密码" />
          <input type="password" placeholder="确认密码" />
        </div>
        <div class="btn-box">
          <button type="button" onclick="mySwitch();alert('注册成功');">注册</button>
          <p onclick="mySwitch()">已有账号,请登录</p>
        </div>
      </div>

      <div class="login-form">
        <div class="title-box">
          <h1>蔡徐坤的狂热粉丝官网</br></h1>
        </div>
        <div class="input-box">
          <input type="text" placeholder="用户名" />
          <input type="password" placeholder="密码" />
        </div>
        <div class="btn-box">
          <a href="home.html"><button>登录</button></a>
          <p onclick="mySwitch()">没有账号,请注册</p>
        </div>
      </div>
    </div>
    <script>
    
      let flag = true;
      const mySwitch = () => {
        if (flag) {
          $(".pre-box").css("transform", "translateX(100%)");
          $(".pre-box").css("background-color", "#c9e0ed");
          $("img").attr("src", "../image/wuwu.gif");
        } else {
          $(".pre-box").css("transform", "translateX(0%)");
          $(".pre-box").css("background-color", "#edd4dc");
          $("img").attr("src", "../image/waoku.jpeg");
        }
        flag = !flag;
      };
    </script>
    <script>
      const bubleCreate = () => {
        const body = document.body;
        const buble = document.createElement("span");
        let r = Math.random() * 5 + 25;
        buble.style.width = r + "px";
        buble.style.height = r + "px";
        buble.style.left = Math.random() * innerWidth + "px";
        body.append(buble);
        setTimeout(() => {
          buble.remove();
        }, 4000);
      };
      setInterval(() => {
        bubleCreate();
      }, 200);
    </script>
  </body>
</html>

home.html

<!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" />
  <link rel="stylesheet" href="../css/Loading.css" />
  <link rel="stylesheet" href="../css/homestyle.css" />
  <link rel="stylesheet" href="../css/body.css" />
  <link rel="stylesheet" href="../css/nav.css" />
  <title>蔡徐坤真爱粉的主页</title> / -
</head>

<body>
  <nav class="homenav">
    <div class="navtitle"><strong>蔡徐坤</strong>|MY giegie</div>
    <a href="home.html">HOME</a>
    <a href="about.html">ABOUT</a>
    <a href="blog.html">BLOG</a>
    <a href="album.html">ALBUM</a>
    <a href="join.html">JOIN</a>
    <div class="navanim home"></div>
    <div class="none"></div>
  </nav>
  <main class="main">
    <section class="sec">
      <div class="titleimg">
        <div class="title">
          &emsp;
          守护 </br>最好的坤坤
        </div>
      </div>
    </section>
    <section class="sec">
      <a href="about.html">
        <div class="part1 pt">
          <div class="imghid">
            <div class="img"></div>
          </div>
          <div class="txt">
            <h1>关于坤坤</h1>
            <p>&emsp;&emsp;你干嘛啊!哎哟</p>
            <p>
              &emsp;&emsp;一个真正的man,一个真正的男人他 清楚自己要做什么,如果你真的想看这一个人 是一个男孩,还是一个男人不要去看他的baby, 看他的心。
            </p>
          </div>
        </div>
      </a>
      <a href="blog.html">
        <div class="part2 pt">
          <div class="txt">
            <h1>博客</h1>
            <p>&emsp;蔡徐坤的博客</p>
            <p>
              &emsp;一般遇到这种过分黑cxk的视频 我都会直接举报。因为这种行为甚至可能造成生命危险,比如把我笑哭啥的。
            </p>
          </div>
          <div class="imghid">
            <div class="img"></div>
          </div>
        </div>
      </a>
      <a href="album.html">
        <div class="part3 pt">
          <div class="imghid">
            <div class="img"></div>
          </div>
          <div class="txt">
            <h1>相册</h1>
            <p>&emsp;&emsp;坤坤的相册</p>
            <p>
              &emsp;&emsp;坤坤这么好凭什么被黑粉们辱骂?坤坤停止一切活动,坤坤的歌和有关坤坤的东西全部下架,这样黑粉们才不会有机可乘。让我们一起守护全世界最好的坤坤。
            </p>
          </div>
        </div>
      </a>
      <a href="join.html">
        <div class="part4 pt">
          <div class="txt">
            <h1>加入</h1>
            <p>&emsp;&emsp;蒸乌鱼,​小黑子树枝666,荔枝呢,油饼食不食,香精煎鱼食不食,香翅捞饭食不食,香菜凤仁鸡食不食,小黑子小雪都没上过吧,没蚊花我劝作者苏珊,你这样让我怎么荔枝,朴信难蒸虾头,梅油酥汁。
            </p>
            <p>
              &emsp;&emsp;
            </p>
          </div>
          <div class="imghid">
            <div class="img"></div>
          </div>
        </div>
      </a>
    </section>
    <footer class="foot">
      <p>@2021-2022 | BY:李文凯、李刚伟</p>
      <p>蔡徐坤的狂热粉丝</p>
      <p>Cease to struggle and you cease to live</p>
    </footer>
  </main>
</body>

</html>

 about.html

<!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>
    <link rel="stylesheet" href="../css/nav.css" />
    <link rel="stylesheet" href="../css/body.css" />
    <link rel="stylesheet" href="../css/about.css" />
  </head>
  <body>
    <nav>
      <div class="navtitle"><strong>蔡徐坤</strong>|MY giegie</div>
      <a href="home.html">HOME</a>
      <a href="about.html">ABOUT</a>
      <a href="blog.html">BLOG</a>
      <a href="album.html">ALBUM</a>
      <a href="join.html">JOIN</a>
      <div class="navanim about"></div>
      <div class="none"></div>
    </nav>
    <div class="mid">
      <div class="headimg">
        <h1>ABOUT KUN</h1>
      </div>
      <div class="ab a1">
        <div class="txt">
          <h2>关于坤坤</h2>
          <p>&emsp;&emsp;练习了两年半的个人练习生蔡徐坤!!!</p>
          <p>&emsp;&emsp;喜欢唱、跳、rap,篮球</p>
        </div>
        <div class="imghid">
          <div class="img"></div>
        </div>
      </div>
      <div class="ab a2">
        <div class="imghid">
          <div class="img"></div>
        </div>
        <div class="txt">
          <h2>关于网站</h2>
          <p>
            &emsp;&emsp;此网页由李文凯与李刚伟共创,让我们一起守护最好的坤坤。我们都爱蔡徐坤,我们都是坤坤的守护天使
          </p>
        </div>
      </div>
      <div class="ab a3">
        <div class="txt">
          <h2>所谓觉悟,就是在漆黑的荒野上开辟出一条理当前进的光明大道。</h2>
        </div>
        <div class="imghid">
          <div class="img"></div>
        </div>
      </div>
    </div>
    <footer class="foot">
      <p>@2021-2022 | BY:李文凯、李刚伟</p>
      <p>蔡徐坤的狂热粉丝</p>
      <p>Cease to struggle and you cease to live</p>
    </footer>
  </body>
</html>

 blog.html

<!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>
    <link rel="stylesheet" href="../css/nav.css" />
    <link rel="stylesheet" href="../css/body.css" />
    <link rel="stylesheet" href="../css/blog.css" />
  </head>
  <body>
    <nav>
      <div class="navtitle"><strong>蔡徐坤</strong>|MY giegie</div>
      <a href="home.html">HOME</a>
      <a href="about.html">ABOUT</a>
      <a href="blog.html">BLOG</a>
      <a href="album.html">ALBUM</a>
      <a href="join.html">JOIN</a>
      <div class="navanim blog"></div>
      <div class="none"></div>
    </nav>
    <div class="mid">
      <div class="content">
        <div class="con c1">
          <div class="imghid">
            <div class="img"></div>
          </div>
          <div class="txt">
            <h2>小黑子油饼哦</h2>
            <p>
              &emsp;&emsp;好丸吗 耗孝吗 有丸没丸 露出鸡脚了吧小黑子 小黑馍蒸了吗
              黑子真虾头 稻纤会不会 蒸乌鱼了 榛果粉 油饼食不食 油不油脂
              鸡肚鸽鸽食不食
            </p>
          </div>
        </div>
        <div class="con c2">
          <div class="imghid">
            <div class="img"></div>
          </div>
          <div class="txt">
            <h2>蔡徐坤的狂热粉丝啊</h2>
            <p>
              &emsp;&emsp;你莓事吧 梅素汁 真没币摇 想进伐艇是不是
              想摇绿尸寒是不是 收绿尸寒开艇的时候别求我 香精煎鱼食不是
              香翅捞饭食不食 香菜凤仁鸡食不食 翅鲍捞橙的食不食
            </p>
          </div>
        </div>
        <div class="con c3">
          <div class="imghid">
            <div class="img"></div>
          </div>
          <div class="txt">
            <h2>专业偷鸡两年半</h2>
            <p>
              &emsp;&emsp;泥枣丸烩金鲣鱼 己经蚂墓了 瘦狗了 奠重会不会
              你们饭发了知道吗
              小黑子小雪都没上过吧,没蚊花我劝作者苏珊,你这样让我怎么荔枝,葡信难蒸虾头
            </p>
          </div>
        </div>
      </div>
      <div class="pri">
        <div class="prihead">
          <a href="join.html"><div class="tx"></div></a>
          <h2>蔡徐坤</h2>
          <p>中分头背带裤,我是坤坤你记住!!!</p>
        </div>
        <div class="tag">
          <h2>TAG</h2>
          <p>
            唱&emsp;&emsp;跳 &emsp;rap&emsp;
            篮球&emsp;&emsp;music&emsp;&emsp;中分头&emsp;&emsp;背带裤&emsp;油饼&emsp;&emsp;香精煎鱼&emsp;
            荔枝 &emsp;香翅捞饭
          </p>
        </div>
      </div>
    </div>
    <footer class="foot">
      <p>@2021-2022 | BY:李文凯、李刚伟</p>
      <p>蔡徐坤的狂热粉丝</p>
      <p>Cease to struggle and you cease to live</p>
    </footer>
  </body>
</html>

 album.html

<!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>
    <link rel="stylesheet" href="../css/body.css" />
    <link rel="stylesheet" href="../css/nav.css" />
    <link rel="stylesheet" href="../css/album.css" />
  </head>
  <body>
    <nav>
      <div class="navtitle"><strong>蔡徐坤</strong>|MY giegie</div>
      <a href="home.html">HOME</a>
      <a href="about.html">ABOUT</a>
      <a href="blog.html">BLOG</a>
      <a href="album.html">ALBUM</a>
      <a href="join.html">JOIN</a>
      <div class="navanim album"></div>
      <div class="none"></div>
    </nav>

    <div class="mid">
      <ul id="banner" class="banner"></ul>
    </div>

    <footer class="foot">
      <p>@2021-2022 | BY:李文凯、李刚伟</p>
      <p>蔡徐坤的狂热粉丝</p>
      <p>Cease to struggle and you cease to live</p>
    </footer>

    <script src="../js/album.js"></script>
  </body>
</html>

 join.html

<!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>
    <link rel="stylesheet" href="../css/nav.css">
    <link rel="stylesheet" href="../css/body.css">
    <link rel="stylesheet" href="../css/join.css">
</head>

<body>
    <nav>
        <div class="navtitle"><strong>蔡徐坤</strong>|MY giegie</div>
        <a href="home.html">HOME</a>
        <a href="about.html">ABOUT</a>
        <a href="blog.html">BLOG</a>
        <a href="album.html">ALBUM</a>
        <a href="join.html">JOIN</a>
        <div class="navanim join"></div>
        <div class="none"></div>
    </nav>
    <div class="mid" id="mid">
        <div class="joinpart" id="jp">
            <div class="left">
                <div class="square"></div>
                <div class="tit">&emsp;JOIN<br>加入我们</div>
            </div>
            <div class="right">
                <div class="goal">
                    <h1>GOAL</h1>
                    <p>&emsp;&emsp;可以关注我家的坤坤哟</p>
                    <p>&emsp;&emsp; 小黑子蒸虾头,真的树脂溜溜溜,油饼食不食,香精煎鱼食不食,香翅捞饭食不食,苏珊,不然抱紧,再黑紫砂,不然开艇的时候不要哭着求我。
                    </p>
                    <div class="meth">
                        <div class="icon qq">
                            <ul>
                                <li>QQ:786734028</li>
                            </ul>
                        </div>
                        <div class="icon vx">
                            <ul>
                                <li>wechat:w786734028</li>
                            </ul>
                        </div>

                        <div class="icon bili">
                            <ul>
                                <li>link to my 坤坤</li>
                            </ul>
                        </div>
                        </a>

                        <div class="icon gh">
                            <ul>
                                <li>link to my giegie</li>
                            </ul>
                        </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer class="foot">
        <p>@2021-2022 | BY:李文凯、李刚伟</p>
        <p>蔡徐坤的狂热粉丝</p>
        <p>Cease to struggle and you cease to live</p>
    </footer>
</body>

</html>

在登录页面有微微的气泡冒出这个特效是text.html实现的

text.html

<!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>test</title>
  </head>
  <style>
    body {
      position: relative;
      overflow-x: hidden;
      height: 100vh;
    }

    span {
      position: absolute;
      bottom: 0;
      background: radial-gradient(
        circle at 72% 28%,
        #fff 3px,
        #ff7edf 8%,
        #5b5b5b,
        #aad7f9 100%
      );
      box-shadow: inset 0 0 6px #fff, inset 3px 0 6px #eaf5fc,
        inset 2px -2px 10px #efcde6, inset 0 0 60px #f9f6de, 0 0 20px #fff;
      border-radius: 50%;
      animation: myMove 4s linear infinite;
      transition: 2s;
    }

    @keyframes myMove {
      0% {
        transform: translateY(0%);
        opacity: 1;
      }

      50% {
        transform: translate(10%, -1000%);
      }

      75% {
        transform: translate(-20%, -1200%);
      }

      99% {
        opacity: 0.9;
      }

      100% {
        transform: translateY(-1800%) scale(1.5);
        opacity: 0;
      }
    }
  </style>
  <body>
    <script>
      const bubleCreate = () => {
        const body = document.body;
        const buble = document.createElement("span");
        let r = Math.random() * 5 + 25; //25~30
        buble.style.width = r + "px";
        buble.style.height = r + "px";
        buble.style.left = Math.random() * innerWidth + "px";
        body.append(buble);
        setTimeout(() => {
          buble.remove();
        }, 4000);
      };
      setInterval(() => {
        bubleCreate();
      }, 200);
    </script>
  </body>
</html>

转载请注明出处或者链接地址:https://www.qianduange.cn//article/16794.html
标签
评论
发布的文章

jQuery File Upload 使用教程

2024-09-03 02:09:33

jQuery笔记

2024-05-03 18:05:51

jQuery-Spectragram 使用教程

2024-09-03 02:09:26

echarts问题汇总

2024-09-03 02:09:12

echarts自定义悬浮提示

2024-09-03 02:09:12

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!