前端-小模块

  • 小米商城侧边栏:
<!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>
        div {
            background-color: gray;
            width: 300px;
            height: 420px;
        }

        a {
            color: white;
            font-size: 1.5em;
            display: block;
            text-decoration: none;
            width: 300px;
            height: 60px;
            /* text-align: center; */
            text-indent: 2em;
            line-height: 60px; /*让行高等于小盒子的高度 可以实现垂直居中*/
        }

        a:hover {
            background-color: orange;
        }
    </style>
</head>

<body>
    <div>
        <a href="#">手机 电话卡</a>
        <a href="#">电视 盒子</a>
        <a href="#">笔记本 平板</a>
        <a href="#">出行 穿戴</a>
        <a href="#">智能 路由器</a>
        <a href="#">健康 儿童</a>
        <a href="#">耳机 音箱</a>
    </div>

</body>

</html>

效果:

  • 新浪首页栏
<!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>
        div {
            height: 80px;
            background-color: white;
            font-size: 2em;
            border-top: 1px solid orange;
            border-bottom: 1px solid gray;
        }

        div a {
            display: inline-block;
            padding: 20px;
            text-decoration: none;
            color: black;
        }

        div a:hover {
            color: orange;
            background-color: #eeedf0;
        }
    </style>
</head>

<body>
    <div>
        <a href="#">新浪导航</a>
        <a href="#">手机新浪网</a>
        <a href="#">移动客户端</a>
        <a href="#">微博</a>
        <a href="https://www.youkuaiyun.com/">优快云</a>
    </div>
</body>

</html>

效果:

下拉表单:select

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    省份:
    <select>
        <option>河南</option>
        <option>黑龙江</option>
        <option>江西</option>
        <option>广东</option>
        <option>河北</option>
    </select>
</body>

</html>

实现效果:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值