静态html+css注册页面

纯静态登陆注册页面代码块(无API接口)

<!DOCTYPE html>
<html>
<head>
    <title>
            登陆注册
    </title>
    <meta charset="utf-8" name="viewport" content="width=device-width" >
    <script type="text/javascript">
        function getFileUrl(sourceId) {
    
            var url;
            if (navigator.userAgent.indexOf("MSIE")>=1) { // IE
                url = document.getElementById(sourceId).value;
            } else if(navigator.userAgent.indexOf("Firefox")>0) { // Firefox
                url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));
            } else if(navigator.userAgent.indexOf("Chrome")>0) { // Chrome
                url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));
            }
            return url;
        }
        function preImg(sourceId, targetId) {
    
            var url = getFileUrl(sourceId);
            var imgPre = document.getElementById(targetId);
            imgPre.src = url;
        }
    </script>
</head>
<body bgcolor="#708090">

<div class="text" style="text-align: center;">
            
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
很高兴为您提供原神静态页面的HTMLCSS代码。以下是一个简单的示例,您可以自行修改和添加内容以满足您的需求。 HTML代码: ``` <!DOCTYPE html> <html> <head> <title>原神静态页面</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <header> <h1>原神</h1> <nav> <ul> <li><a href="#">首页</a></li> <li><a href="#">角色</a></li> <li><a href="#">武器</a></li> <li><a href="#">地图</a></li> <li><a href="#">社区</a></li> </ul> </nav> </header> <main> <section class="banner"> <h2>你的冒险从这里开始</h2> <p>探索广阔的世界,结识各种伙伴,成为传说中的英雄!</p> <a href="#" class="btn">开始冒险</a> </section> <section class="characters"> <h2>热门角色</h2> <div class="character"> <img src="https://img.genshin.mihoyo.com/en/latest/thumb/cover/character/Amber.png" alt="Amber"> <h3>安柏</h3> </div> <div class="character"> <img src="https://img.genshin.mihoyo.com/en/latest/thumb/cover/character/Barbara.png" alt="Barbara"> <h3>芭芭拉</h3> </div> <div class="character"> <img src="https://img.genshin.mihoyo.com/en/latest/thumb/cover/character/Diluc.png" alt="Diluc"> <h3>迪卢克</h3> </div> </section> <section class="weapons"> <h2>热门武器</h2> <div class="weapon"> <img src="https://img.genshin.mihoyo.com/en/latest/thumb/cover/weapon/Sword.png" alt="Sword"> <h3>单手剑</h3> </div> <div class="weapon"> <img src="https://img.genshin.mihoyo.com/en/latest/thumb/cover/weapon/Bow.png" alt="Bow"> <h3>弓</h3> </div> <div class="weapon"> <img src="https://img.genshin.mihoyo.com/en/latest/thumb/cover/weapon/Polearm.png" alt="Polearm"> <h3>长柄武器</h3> </div> </section> </main> <footer> <p>© 2021 原神</p> </footer> </body> </html> ``` CSS代码: ``` /* Reset styles */ * { margin: 0; padding: 0; box-sizing: border-box; } /* Global styles */ body { font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; color: #333; background-color: #f9f9f9; } /* Page header */ header { background-color: #fff; padding: 20px; box-shadow: 0px 3px 5px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; } header h1 { font-size: 32px; font-weight: bold; margin: 0; } nav { margin-top: 10px; } nav ul { list-style: none; display: flex; } nav ul li { margin-right: 20px; } nav ul li a { color: #333; text-decoration: none; font-size: 18px; font-weight: bold; transition: color 0.2s ease-in-out; } nav ul li a:hover { color: #ff7f50; } /* Banner section */ .banner { background-image: url(https://img.genshin.mihoyo.com/en/latest/bg/img/bg-home-main.jpg); background-size: cover; background-position: center; height: 400px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; text-align: center; } .banner h2 { font-size: 48px; font-weight: bold; margin-bottom: 20px; } .banner p { font-size: 24px; margin-bottom: 30px; } .btn { background-color: #ff7f50; color: #fff; padding: 10px 20px; border-radius: 5px; font-size: 16px; text-decoration: none; transition: background-color 0.2s ease-in-out; } .btn:hover { background-color: #ff6347; } /* Characters section */ .characters { padding: 50px 20px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; } .character { margin-right: 30px; margin-bottom: 30px; } .character img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; box-shadow: 0px 3px 5px rgba(0,0,0,0.1); } .character h3 { font-size: 24px; font-weight: bold; margin-top: 10px; } /* Weapons section */ .weapons { padding: 50px 20px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; } .weapon { margin-right: 30px; margin-bottom: 30px; } .weapon img { width: 200px; height: 200px; object-fit: cover; box-shadow: 0px 3px 5px rgba(0,0,0,0.1); } .weapon h3 { font-size: 24px; font-weight: bold; margin-top: 10px; } /* Page footer */ footer { padding: 20px; background-color: #fff; text-align: center; border-top: 1px solid #ddd; margin-top: 50px; } ``` 请注意,这只是一个简单的示例,您可以自由修改样式和布局以满足您的需求。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值