讲师中心 微信公众号
AI工具推荐 视频效率加速

前端尝试

梦明吖_8410

梦明吖_8410

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

|

906人浏览过

|

来源于dev.to

转载

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

我建造了什么

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

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

您也可以在github上查看代码

旅程

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

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

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

YiHui GIT MONITOR
YiHui GIT MONITOR

通用Git项目监控工具,支持GitHub、GitLab、Gitee等所有平台,自动检测、添加/删除仓库更新并生成变更摘要。

下载

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

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

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

代码

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>
            <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工具

更多
音述AI
音述AI Hot

一款AI音频处理工具,主要用于音述AI是一个以“用声音述说故事”为核心的 AI 音乐创作与声音分享社区,适合需要提升相关任务效率的用户。

WorkBuddy

一款AI办公效率工具,主要用于腾讯云推出的AI原生桌面智能体工作台,适合需要提升相关任务效率的用户。

讯飞智作

讯飞智作是一款AI视频创作工具,AI文本配音工具,数字人课程、营销视频制作。

DeepSeek

DeepSeek是一款面向对话、写作、编程和推理场景的AI大模型工具。

SkildArt
SkildArt Hot

SkildArt是一款AI文本写作工具,一站式 AI 视觉创作平台。

Loomy
Loomy Hot

一款AI工具,主要用于科大讯飞发布的桌面级 AI 助理,比 OpenClaw 更易用、更安全!,适合需要提升相关任务效率的用户。

UP简历
UP简历 Hot

一款AI办公效率工具,主要用于基于AI技术的免费在线简历制作工具,适合需要提升相关任务效率的用户。

PixTV
PixTV Hot

PixTV是一款面向AIGC内容创作的AI视频生成工具。

豆包大模型

豆包大模型是一款由字节跳动推出的企业级大语言模型服务平台。

相关专题

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

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

8545

2026.01.21

GitHub官网入口版本汇总
GitHub官网入口版本汇总

本专题整合了GitHub入口版本地址汇总,阅读专题下面的文章了解更多详细内容。

878

2026.04.02

Playwright 测试失败怎么办
Playwright 测试失败怎么办

Playwright测试失败专题汇集超时、定位器匹配、浏览器提前关闭、依赖与插件配置、文件上传、SSL及Docker启动等故障文章,并介绍通过截图、报告和Trace定位错误。

0

2026.10.21

Playwright 页面操作指南
Playwright 页面操作指南

Playwright页面操作专题汇集元素定位、点击与输入、等待响应、多页面切换、Iframe、事件监听及文件处理的已审核文章,便于按操作场景查阅示例与常见问题。

0

2026.10.21

Playwright 入门教程
Playwright 入门教程

Playwright入门专题汇集测试框架安装、VS Code配置、录制脚本、编写首个用例、运行调试及查看报告的已审核文章,帮助初学者搭建端到端测试流程。

0

2026.10.21

OpenJDK JVM参数怎么调优
OpenJDK JVM参数怎么调优

Java应用运行缓慢,如何调整JVM参数?本专题介绍OpenJDK JVM性能调优的基本流程,涵盖性能指标确认、运行数据采集、内存配置和垃圾回收分析,帮助你先定位瓶颈,再通过对照测试验证效果,避免直接套用参数而影响应用稳定性。

100

2026.10.16

OpenJDK怎么配置Java开发环境
OpenJDK怎么配置Java开发环境

怎样用OpenJDK搭建开发环境?本专题介绍版本选择、下载安装、环境变量配置和编译运行验证,帮助你理清JDK的作用及基本配置流程,并通过简单程序检查环境是否可用,为后续项目开发做好准备。

80

2026.10.16

OpenJDK怎么部署Java应用
OpenJDK怎么部署Java应用

Java项目开发完成后,怎样部署到目标环境并正常运行?本专题介绍OpenJDK应用部署流程,涵盖运行环境准备、版本兼容检查、应用打包、启动参数配置和日志查看,帮助你理清部署前后的操作顺序,减少环境差异造成的运行问题。

40

2026.10.16

Revel框架模板渲染与表单验证
Revel框架模板渲染与表单验证

本专题围绕Revel框架视图层开发,介绍模板语法、变量输出、布局复用、表单提交、参数绑定与验证规则,帮助开发者完成安全规范的页面交互。

40

2026.10.16

热门下载

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

精品课程

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

共14课时 | 1.5万人学习

Bootstrap 5教程
Bootstrap 5教程

共46课时 | 6万人学习

CSS教程
CSS教程

共754课时 | 98.2万人学习

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

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn