0

0

前端尝试

王林

王林

发布时间:2024-09-06 14:40:27

|

886人浏览过

|

来源于dev.to

转载

这是前端挑战 v24.09.04 的提交内容,美化我的标记:space

我建造了什么

我构建了一个以太空为主题的登陆页面,提供有关太空探索的信息。目标是创造一个有吸引力的简约设计,突出太空历史、当前任务、未来任务等的关键方面。该页面包括主页、关于、历史、当前任务、未来任务、调查问卷和联系信息等部分。

演示
您可以在此处实时查看该项目。以下是登陆页面的屏幕截图:
前端尝试
太空探索登陆页面

您也可以在github上查看代码

旅程

立即学习前端免费学习笔记(深入)”;

创建这个项目是一次令人兴奋的旅程。以下是有关该过程的一些要点:

设计和布局:我的目标是干净简约的设计,带有黑暗的太空主题背景,以创造身临其境的体验。布局简单但信息丰富,使用户可以轻松浏览不同的部分。

内容:我包含了有关太空探索历史、当前和未来任务的详细信息。问卷部分允许用户互动并分享他们对太空探索的想法。

挑战:挑战之一是确保动画交互在不同设备和屏幕尺寸上顺利运行。在这个过程中我学到了很多关于响应式设计和跨浏览器兼容性的知识。

未来计划:我计划添加更多互动元素,例如有关太空事实的测验和太空探索中重大事件的时间表。我也希望整合更高级的动画和转场,让页面更加吸引人。

代码

html

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>space exploration</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <header class="space-background">
        <h1>welcome to space exploration</h1>
        <nav>
            <ul>
                <li><a href="#home">home</a></li>
                <li><a href="#about">about</a></li>
                <li><a href="#history">history</a></li>
                <li><a href="#current-missions">current missions</a></li>
                <li><a href="#future-missions">future missions</a></li>
                <li><a href="#questionnaire">questionnaire</a></li>
                <li><a href="#contact">contact</a></li>
            </ul>
        </nav>
    </header>
    <main class="space-background">
        <section id="home">
            <h2>home</h2>
            <p>discover the wonders of the universe and our journey into space.</p>
        </section>
        <section id="about">
            <h2>about</h2>
            <p>learn about the history and future of space exploration.</p>
        </section>
        <section id="history">
            <h2>history of space exploration</h2>
            <h3>1. early concepts (pre-20th century)</h3>
            <p><strong>ancient civilizations:</strong> ancient cultures like the babylonians, egyptians, greeks, and chinese were among the first to study the stars and celestial objects, laying the foundation for astronomy.</p>
            <p><strong>17th century:</strong> johannes kepler’s laws of planetary motion and isaac newton’s law of universal gravitation provided the necessary understanding for future space travel concepts.</p>
            <h3>2. early 20th century</h3>
            <p><strong>tsiolkovsky's rocket equation (1903):</strong> russian scientist konstantin tsiolkovsky proposed the idea of space travel using rockets and formulated the tsiolkovsky rocket equation, a fundamental principle in astronautics.</p><div class="aritcle_card flexRow">
                                                        <div class="artcardd flexRow">
                                                                <a class="aritcle_card_img" href="/ai/1529" title="Onu"><img
                                                                                src="https://img.php.cn/upload/ai_manual/000/969/633/68b7a26d347fe196.png" alt="Onu"  onerror="this.onerror='';this.src='/static/lhimages/moren/morentu.png'" ></a>
                                                                <div class="aritcle_card_info flexColumn">
                                                                        <a href="/ai/1529" title="Onu">Onu</a>
                                                                        <p>将脚本转换为内部工具,不需要前端代码。</p>
                                                                </div>
                                                                <a href="/ai/1529" title="Onu" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a>
                                                        </div>
                                                </div>
            <p><strong>robert goddard (1926):</strong> an american physicist, robert goddard, successfully launched the world's first liquid-fueled rocket, proving that space travel was possible.</p>
            <h3>3. the space race (1950s-1970s)</h3>
            <p><strong>sputnik 1 (1957):</strong> the soviet union launched the first artificial satellite, sputnik 1, into space, marking the beginning of the space age.</p>
            <p><strong>yuri gagarin (1961):</strong> soviet cosmonaut yuri gagarin became the first human to orbit earth aboard vostok 1, a major milestone in space exploration.</p>
            <p><strong>apollo 11 (1969):</strong> the united states' nasa successfully landed astronauts neil armstrong and buzz aldrin on the moon, with armstrong famously declaring, "that's one small step for man, one giant leap for mankind."</p>
            <h3>4. post-moon landings and the space shuttle era (1970s-1990s)</h3>
            <p><strong>space stations:</strong></p>
            <ul>
                <li><strong>salyut and mir (1971-1986):</strong> the soviet union launched a series of space stations, culminating in the long-lasting mir, which operated until 2001.</li>
                <li><strong>skylab (1973):</strong> the united states launched its first space station, skylab, which was operational for six years.</li>
            </ul>
            <p><strong>space shuttle program (1981-2011):</strong> nasa’s reusable space shuttle fleet completed 135 missions over 30 years, including launching satellites, conducting scientific research, and assembling the international space station (iss).</p>
            <h3>5. international cooperation and space exploration (1990s-present)</h3>
            <p><strong>international space station (iss) (1998-present):</strong> a joint effort by nasa, roscosmos (russia), esa (europe), jaxa (japan), and other partners, the iss serves as a hub for scientific research and international collaboration in low earth orbit.</p>
            <p><strong>mars exploration:</strong></p>
            <ul>
                <li><strong>rovers and orbiters:</strong> the mars rovers like spirit, opportunity, curiosity, and perseverance have provided detailed information about the martian surface and its potential to support life.</li>
                <li><strong>exomars (2020):</strong> a european-russian mission designed to search for signs of life on mars.</li>
            </ul>
            <h3>6. private space exploration and the future (2000s-present)</h3>
            <p><strong>commercial spaceflight:</strong> companies like spacex, blue origin, and virgin galactic are pioneering commercial space travel, aiming to make space more accessible to private individuals and researchers.</p>
        </section>
        <section id="current-missions">
            <h2>current missions</h2>
            <p>explore the ongoing missions that are expanding our understanding of the universe.</p>
        </section>
        <section id="future-missions">
            <h2>future missions</h2>
            <p>learn about the upcoming missions that aim to push the boundaries of space exploration.</p>
        </section>
        <section id="questionnaire">
            <h2>questionnaire</h2>
            <form>
                <label for="name">name:</label>
                <input type="text" id="name" name="name" required><br><br>

                <label for="email">email:</label>
                <input type="email" id="email" name="email" required><br><br>

                <label for="question1">1. what is your favorite planet?</label><br>
                <input type="text" id="question1" name="question1" required><br><br>

                <label for="question2">2. have you ever visited a space museum?</label><br>
                <input type="radio" id="yes" name="question2" value="yes">
                <label for="yes">yes</label><br>
                <input type="radio" id="no" name="question2" value="no">
                <label for="no">no</label><br><br>

                <label for="question3">3. what interests you the most about space exploration?</label><br>
                <textarea id="question3" name="question3" rows="4" cols="50" required></textarea><br><br>

                <input type="submit" value="submit">
            </form>
        </section>
        <section id="contact">
            <h2>contact</h2>
            <p>get in touch with us for more information about space exploration.</p>
        </section>
    </main>
    <footer class="space-background">
        <p>© 2024 space exploration. all rights reserved.</p>
    </footer>
</body>
</html>

css

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #000;
    color: #fff;
}

.space-background {
    background: rgba(0, 0, 0, 0.8) url('https://www.nasa.gov/sites/default/files/thumbnails/image/potw2048a.jpg') no-repeat center center;
    background-size: cover;
}

header {
    padding: 1rem 0;
    text-align: center;
}

header h1 {
    margin-bottom: 0.5rem;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 2rem;
}

section {
    margin-bottom: 2rem;
}

form {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 5px;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
}

form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 5px;
}

form input[type="submit"] {
    background: #333;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

form input[type="submit"]:hover {
    background: #555;
}

footer {
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

团队
这个项目是一个人的努力,但我想归功于以下资源和灵感:

  • nasa 令人惊叹的太空图像。

  • mdn web 文档,提供有关 web 开发的优秀文档。

许可证
该项目根据 mit 许可证获得许可。请随意使用和修改您认为合适的代码。

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
github中文官网入口 github中文版官网网页进入
github中文官网入口 github中文版官网网页进入

github中文官网入口https://docs.github.com/zh/get-started,GitHub 是一种基于云的平台,可在其中存储、共享并与他人一起编写代码。 通过将代码存储在GitHub 上的“存储库”中,你可以: “展示或共享”你的工作。 持续“跟踪和管理”对代码的更改。

2641

2026.01.21

pixiv网页版官网登录与阅读指南_pixiv官网直达入口与在线访问方法
pixiv网页版官网登录与阅读指南_pixiv官网直达入口与在线访问方法

本专题系统整理pixiv网页版官网入口及登录访问方式,涵盖官网登录页面直达路径、在线阅读入口及快速进入方法说明,帮助用户高效找到pixiv官方网站,实现便捷、安全的网页端浏览与账号登录体验。

796

2026.02.13

微博网页版主页入口与登录指南_官方网页端快速访问方法
微博网页版主页入口与登录指南_官方网页端快速访问方法

本专题系统整理微博网页版官方入口及网页端登录方式,涵盖首页直达地址、账号登录流程与常见访问问题说明,帮助用户快速找到微博官网主页,实现便捷、安全的网页端登录与内容浏览体验。

272

2026.02.13

Flutter跨平台开发与状态管理实战
Flutter跨平台开发与状态管理实战

本专题围绕Flutter框架展开,系统讲解跨平台UI构建原理与状态管理方案。内容涵盖Widget生命周期、路由管理、Provider与Bloc状态管理模式、网络请求封装及性能优化技巧。通过实战项目演示,帮助开发者构建流畅、可维护的跨平台移动应用。

143

2026.02.13

TypeScript工程化开发与Vite构建优化实践
TypeScript工程化开发与Vite构建优化实践

本专题面向前端开发者,深入讲解 TypeScript 类型系统与大型项目结构设计方法,并结合 Vite 构建工具优化前端工程化流程。内容包括模块化设计、类型声明管理、代码分割、热更新原理以及构建性能调优。通过完整项目示例,帮助开发者提升代码可维护性与开发效率。

25

2026.02.13

Redis高可用架构与分布式缓存实战
Redis高可用架构与分布式缓存实战

本专题围绕 Redis 在高并发系统中的应用展开,系统讲解主从复制、哨兵机制、Cluster 集群模式及数据分片原理。内容涵盖缓存穿透与雪崩解决方案、分布式锁实现、热点数据优化及持久化策略。通过真实业务场景演示,帮助开发者构建高可用、可扩展的分布式缓存系统。

92

2026.02.13

c语言 数据类型
c语言 数据类型

本专题整合了c语言数据类型相关内容,阅读专题下面的文章了解更多详细内容。

53

2026.02.12

雨课堂网页版登录入口与使用指南_官方在线教学平台访问方法
雨课堂网页版登录入口与使用指南_官方在线教学平台访问方法

本专题系统整理雨课堂网页版官方入口及在线登录方式,涵盖账号登录流程、官方直连入口及平台访问方法说明,帮助师生用户快速进入雨课堂在线教学平台,实现便捷、高效的课程学习与教学管理体验。

15

2026.02.12

豆包AI网页版入口与智能创作指南_官方在线写作与图片生成使用方法
豆包AI网页版入口与智能创作指南_官方在线写作与图片生成使用方法

本专题汇总豆包AI官方网页版入口及在线使用方式,涵盖智能写作工具、图片生成体验入口和官网登录方法,帮助用户快速直达豆包AI平台,高效完成文本创作与AI生图任务,实现便捷智能创作体验。

717

2026.02.12

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
Sass 教程
Sass 教程

共14课时 | 0.9万人学习

Bootstrap 5教程
Bootstrap 5教程

共46课时 | 3.4万人学习

CSS教程
CSS教程

共754课时 | 34.4万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号