java写html5

第一种方法


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>
        .logo{
            float: left;
            width: 33%;
            height: 60px;
            line-height: 60px;
        }

        .menu{
            width: 18%;
            display: inline-block;
            text-align: center;
            text-decoration: none;
            line-height: 50px;
            height: 50px;
        }

        .product{
            float: left;
            text-align: center;
            width: 16.6%;
            height: 240px;
        }

    </style>
</head>
<body>
<div>
    <div>
        <div class="logo">
            <img src="../img/logo2.png" height="50px">
        </div>
        <div class="logo" align="center">
            <img src="../img/header.jpg">
        </div>
        <div class="logo" align="right">
            <a href="#">登入</a>
            <a href="#">注册</a>
            <a href="#">购物车</a>
        </div>
    </div>
    <div style="clear: both"></div>

    <div style="background-color: black;height: 50px">
        <a href="#" class="menu"><font color="white">首页</font></a>
        <a href="#" class="menu"><font color="white">手机数码</font></a>
        <a href="#" class="menu"><font color="white">鞋靴箱包</font></a>
        <a href="#" class="menu"><font color="white">电脑办公</font></a>
        <a href="#" class="menu"><font color="white">香烟酒水</font></a>
    </div>

    <div>
        <img src="../img/1.jpg" width="100%">
    </div>

    <div>
        <div><h2>最新商品<img src="../img/title2.jpg"></h2></div>

        <div style="float: left;height: 480px">
            <img src="../products/hao/big01.jpg">
        </div>
        <div style="float: left;height: 480px;width: 80%">
            <div style="float: left;width: 50%;height: 240px">
                <img src="../products/hao/middle01.jpg" width="100%" height="100%">
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>
            <div class="product">
                <img src="../products/hao/small06.jpg">
                <p>洗衣机</p>
                <p style="color: red;">$999</p>
            </div>

        </div>

    </div>
    <div>
        <img src="../products/hao/ad.jpg" width="100%">
    </div>

    <div>
        <img src="../img/footer.jpg" width="100%">
    </div>

    <div style="text-align: center">
        <a href="#">关于我们</a>
        <a href="#">联系我们</a>
        <a href="#">招贤纳士</a>
        <a href="#">法律声明</a>
        <a href="#">友情链接</a>
        <a href="#">支付方式</a>
        <a href="#">配送方式</a>
        <a href="#">服务声明</a>
        <a href="#">广告声明</a>
    </div>

    <div style="text-align: center">
        Copyright @ 2019-2039 中软国际 版权所有
    </div>



</div>

</body>
</html>

结果如下图所示

在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值