2023.11.21与2023.11.23作业

文章展示了HTML和CSS代码片段,关注于页面布局中的div元素、文本对齐、浮动和绝对定位问题,以及Xiaomi相关产品分类。作者寻求帮助解决商标图片位置和浮动元素影响的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
         *{
            margin:0;
            padding: 0;
            }

.one{
    width:100%;
    height:40px;
    background-color: #333;
    opacity:0.8;
    line-height: 40px;
    text-align: center; 
    /* 用空格进行处理,此处需寻求帮助 */
}
.two{
    text-align: center; 
}
.three{
    clear:right;
    float:right;
}
.four{
    position: absolute;
    height:600px;
    width:800px;
    top:300px;
    right:600px;
    background-color: aqua;
}
.five{
    height:600px;
    width:600px;
    background-color: #333;
    float:right;
    clear:both;
    /* 这里莫名被顶上去了,需要处理 */
}
li{
    list-style:none;
}
    </style>
</head>
<body>
    <div class="one">
       <div>
        one|two|three|four|five|six              登录|注册|消息通知|购物车
       </div>
    </div>
    <img src="./code.jpg">
    <!-- 随便找了张图,就是对应商标 -->
    <!-- 位置问题未得到妥善处理 -->
    <div class="two">
          Xiaomi手机 Redmi手机 电视 笔记本 平板 家电 路由器 服务中心 社区
       </div>
    <input type="text" class="three">
    <div class="four">
        <ul>
            <li>11111</li>
            <li>11111</li>
            <li>11111</li>
            <li>11111</li>
            <li>11111</li>
            <li>11111</li>
            <div class="five"></div>
        </ul>
    </div>
</body>
</html>

准备向老师请教。。。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值