B站coderwhy前端学习星球介绍作业

<!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>Document</title>
    <style>
        strong {background-color:rgb(0, 172, 252)}
        img {width:200px;}
    
    </style>
</head>
<body>
    <h1>星球介绍</h1>
    
    <img src="https://bkimg.cdn.bcebos.com/pic/f636afc379310a55f65b5ed3b74543a98226109d?x-bce-process=image/resize,m_lfit,w_440,limit_1/format,f_auto">
    <p><strong>木星(Jupiter)</strong>是距离太阳第五近的行星,也是太阳系中体积最大的行星,截至2019年已知有79颗卫星。</p>
    <p>古人早已认识这颗行星 ,罗马人以主神朱庇特命名这颗行星。古代中国则称木星为岁星,取其绕行地球一周约为12年,与地支相同之故。到西汉时期,《史记‧天官书》作者司马迁从实际观测发现岁星呈青色,与“五行”学说联系在一起,正式把它命名为“木星”。
    </p>
    <img src="https://bkimg.cdn.bcebos.com/pic/48540923dd54564e9258e5d1e5978b82d158cdbfe188?x-bce-process=image/resize,m_lfit,w_536,limit_1/format,f_jpg
    ">
    <p><strong>地球(英文名:Earth;拉丁文:Terra)</strong>是距离太阳的第三颗行星,也是已知的唯一孕育和支持生命的天体。地球表面的大约 29.2% 是由大陆和岛屿组成的陆地。剩余的 70.8% 被水覆盖,大部分被海洋、海湾和其他咸水体覆盖,也被湖泊、河流和其他淡水覆盖,它们共同构成了水圈。地球的大部分极地地区都被冰覆盖。地球外层分为几个刚性构造板块,它们在数百万年的时间里在地表迁移,而其内部仍然保持活跃,有一个固体铁内核、一个产生地球磁场的液体外核,以及一个驱动板块构造的对流地幔。</p>
</body>
</html>

p>

![在这里插入图片描述](https://img-blog.csdnimg.cn/bab005776ff748b5a9caf196d17913ed.PNG?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAY29kZXJfNjZs,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center)
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我了解了。首先,您需要创建一个新的 GitHub 仓库来存储您的前端代码。然后,您可以使用 HTML、CSS 和 JavaScript 来编写您的星球大战前端页面。 以下是一个简单的代码示例,用于创建一个基本的星球大战页面: ```html <!DOCTYPE html> <html> <head> <title>Star Wars</title> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> </head> <body> <header> <h1>Star Wars</h1> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">Movies</a></li> <li><a href="#">Characters</a></li> <li><a href="#">Planets</a></li> </ul> </nav> </header> <main> <section> <h2>Featured Movie</h2> <div class="movie-container"> <img src="https://images.unsplash.com/photo-1589945381786-1b2a2b6f7a6d?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTZ8fHN0YXIlMjB3YXJzfGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Star Wars Episode IX: The Rise of Skywalker"> <h3>Star Wars Episode IX: The Rise of Skywalker</h3> <p>The surviving members of the resistance face the First Order once again, and the legendary conflict between the Jedi and the Sith reaches its peak bringing the Skywalker saga to its end.</p> </div> </section> <section> <h2>Featured Character</h2> <div class="character-container"> <img src="https://images.unsplash.com/photo-1617129213797-9c9f13b38f6b?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8Y2hhcmFjdGVyJTIwYmFzdGFyZGVuJTIwcGxhbmV0fGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Chewbacca"> <h3>Chewbacca</h3> <p>Chewbacca, a legendary Wookiee warrior and co-pilot of the Millennium Falcon, played a vital role in the Galactic Civil War and the Clone Wars.</p> </div> </section> <section> <h2>Featured Planet</h2> <div class="planet-container"> <img src="https://images.unsplash.com/photo-1617129475124-bc4b6d4f08c8?ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8cGxhbmV0JTIwZGVzaWdufGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Tatooine"> <h3>Tatooine</h3> <p>Tatooine is a desert planet located in the Outer Rim of the galaxy. It is known for its many inhabitants, including Jawas, Tusken Raiders, and the Hutts.</p> </div> </section> </main> <footer> <p>© 2021 Star Wars. All rights reserved.</p> </footer> </body> </html> ``` 然后,您可以使用 CSS 样式表来定义您的页面的外观和样式,例如: ```css body { font-family: Arial, sans-serif; background-color: #000; color: #fff; } header { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background-color: #333; } h1 { font-size: 4rem; margin: 0; } nav ul { display: flex; list-style: none; margin: 0; padding: 0; } nav li { margin: 0 20px; } nav a { color: #fff; text-decoration: none; } main { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 50px; } section { flex-basis: 30%; margin-bottom: 50px; } .movie-container, .character-container, .planet-container { display: flex; flex-direction: column; align-items: center; text-align: center; } img { max-width: 100%; height: auto; margin-bottom: 20px; } h3 { font-size: 2rem; margin: 0; } p { line-height: 1.5; margin: 0; } footer { text-align: center; padding: 20px; background-color: #333; } ``` 最后,您可以使用 JavaScript 来为您的页面添加一些交互性和动态效果,例如: ```js const movieContainer = document.querySelector('.movie-container'); const characterContainer = document.querySelector('.character-container'); const planetContainer = document.querySelector('.planet-container'); movieContainer.addEventListener('click', () => { alert('You clicked on the featured movie!'); }); characterContainer.addEventListener('mouseover', () => { characterContainer.classList.add('highlighted'); }); characterContainer.addEventListener('mouseout', () => { characterContainer.classList.remove('highlighted'); }); planetContainer.addEventListener('click', () => { planetContainer.innerHTML = '<img src="https://images.unsplash.com/photo-1599219391627-23cfd3f8bf44?ixid=MnwxMjA3fDB8MHxzZWFyY2h8OHx8cGxhbmV0JTIwZGVzaWduJTIwYmFzdGFyZGVuJTIwcGxhbmV0fGVufDB8fDB8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60" alt="Alderaan"><h3>Alderaan</h3><p>Alderaan was a planet located in the Core Worlds known for its peaceful culture and beautiful landscapes, until it was destroyed by the Death Star.</p>'; }); ``` 当然,这只是一个简单的示例。您可以根据自己喜好和需求进行更改和扩展。祝您好运!

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值