使用HTML+CSS完成华为官网登录页面效果(静态页面)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../static/css/huaweiRegister.css">

</head>
<body>
    <body style="background-color: #eff1f5"></body>
    <div style="width: 1500px;height: 30px;background-color: black;">
        <div class="d1">
            <img src="../static/images/language_logo.png" alt="" width="15px">
            简体中文(中国)
        </div>
    </div>
    <div style="width: 1500px;height: 70px;background-color: white;">
        <img src="../static/images/huawei-logo.jpg" alt="" width="130px" style="position: relative;top: 20px;left: 150px;">
    </div>
    <div class="box">
        <div class="d2">Uniportal帐号登录</div>
        <div class="d6"><input type="text" placeholder="&nbsp;&nbsp;帐号名/邮箱/手机号/W3帐号"
            style="  height: 42px;
            line-height: 42px;
            background: #ffffff;
            border: 1px solid #d4d4d4;
            border-radius: 2px;
            outline: none;
            width:100%;
            margin-top:10px;margin-bottom:10px;"
        /></div>
       <!-- <div><input type="password" style="width:450px;height:43px;margin-top:10px;margin-bottom:10px;border: 1px solid darkgray;" /></div>  -->
        <div><input type="password" placeholder="&nbsp;&nbsp;密码" style="
            height: 42px;
            line-height: 42px;
            background: #ffffff;
            border: 1px solid #d4d4d4;
            border-radius: 2px;
            outline: none;
            width:100%;
            margin-top:10px;margin-bottom:10px;"
            />
        </div>
        <div class="d3" >短信验证码登录</div>
        <div>
            <input type="submit" value="登录" style="display: block;
                max-height: 48px !important;
                padding: 15px 20px;
                width: 100%;
                text-align: center;
                background-color: #C7000B;
                border: 1px solid #C7000B;
                border-radius: 4px;
                font-size: 18px;
                font-weight: 500;
                color: #ffffff;"
            />
        </div>
        <div class="d4">立即注册&nbsp;|&nbsp;忘记密码&nbsp;|&nbsp;修改密码</div>
        <div class="d6">
            <img src="../static/images/wenhao.png" alt="" width="15px">
            点击获取更多帮助?
        </div>
    </div>
    <div style="width: 1500px;height: 30px;background-color: black;position:relative;bottom: 0px; ">
        <div class="d5">版权所有 © 华为技术有限公司 1998-2022。保留一切权利。粤A2-20044005号</div>
    </div>
</body>
</html>
.box{
    background-color:white;
    width: 325px;
    height: 285px;
    padding: 100px;
    margin-top: 50px;
    margin-bottom: 60px;
    position: relative;
    left:500px;
}
.d1{color: white;position: absolute;right: 100px;font-size: 12px;}
.d2{
      height: auto;
      font-family: PingFangSC-Semibold;
      font-size: 29px;
      font-weight: 400;
      color: #333333;
      letter-spacing: 0;
      word-wrap: break-word;
      word-break: break-all;
      text-align: center;
      margin-top:-40px;
      margin-bottom:30px;
}
.d3{color: blue;font-size: 15px;margin-top:15px;margin-bottom:15px;position: relative;left: 225px;}
.d4{color: blue;font-size: 15px;margin-top:15px;margin-bottom:15px;text-align: center;}
.d5{color: darkgray;position: absolute;left: 30px;bottom: 5px;font-size: 12px;}
.d6{color: dimgray;font-size: 15px;text-align: center;}

页面效果如下

 

HTMLCSS可以用于创建网页的基本结构和样式,但是直接提供一个完整的华为官网页面的全代码实现会非常庞大,并不适合在这里展示。不过我可以给你一个简单的例子,展示如何开始搭建一个基础的静态页面布局。 ```html <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>华为官网首页</title> <link rel="stylesheet" href="styles.css"> <!-- 这里假设有一个名为styles.css的外部样式表 --> </head> <body> <header> <div class="logo"> <img src="huawei-logo.png" alt="华为LOGO"> </div> <nav> <ul> <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="hero"> <h1>华为智能生活</h1> <p>体验前沿科技,享受智能未来</p> </section> <section class="features"> <!-- 这里可以添加一些特色功能介绍 --> </section> </main> <footer> <p>© 2023 华为技术有限公司 | 版权所有</p> </footer> </body> </html> ``` 接下来是相应的CSS部分,仅示例基本布局: ```css /* styles.css */ * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: Arial, sans-serif; line-height: 1.6; } header { background-color: #f4f4f4; padding: 2rem; } .logo img { width: 150px; height: auto; } nav ul { list-style-type: none; display: flex; justify-content: space-between; } nav a { text-decoration: none; color: black; } .hero { text-align: center; padding: 2rem; } .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; } ``` 这只是一个简化的版面,实际的华为官网会有更复杂的设计、交互和动态内容。如果你想创建类似项目,建议参考华为官网HTML结构并结合响应式设计,同时利用CSS框架如Bootstrap或自定义CSS样式。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

八月和我

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值