百度样式-html、css

效果图

 

 html代码

<!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>
    <link rel="stylesheet" href="./css/baidu.css">
</head>

<body>
    <div class="nav">
        <a href="http://news.baidu.com/">新闻</a>
        <a href="https://www.hao123.com/?src=from_pc_logon/">hao123</a>
        <a href="http://map.baidu.com/">地图</a>
        <a href="http://tieba.baidu.com/">贴纸</a>
        <a href="https://haokan.baidu.com/?sfrom=baidu-top">视频</a>
        <a href="http://image.baidu.com/">图片</a>
        <a href="https://pan.baidu.com/?from=1026962h/">网盘</a>
        <a href="http://www.baidu.com/more/">更多</a>
        <button>登录</button>
        <span>设置</span>
    </div>
    <div class="header">
        <div class="logos">
            <img class="logo" src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" alt="">
        </div>
        <div class="search">
            <input type="text" class="text">
            <input type="button" value="百度一下" class="button">
        </div>
    </div>
    <div class="content">
        <div class="one"><strong>&nbsp;&nbsp;百度热搜</strong>></div>
        <div class="two" style="text-align: right;"><span>换一换</span></div>
        <div style="display: flex;">
            <img src="./img/top.png" alt="">
            <a href="#">置顶热搜置顶热搜</a>
        </div>
        <div>
            <span style="color: #faa90e;">3</span>
            &nbsp;&nbsp;<a href="#">第三个热搜第三个热搜</a>
            <span class="top">热</span>
        </div>
        <div>
            &nbsp;&nbsp;<span class="one" style="color: #fe2d46;">1</span>
            &nbsp;&nbsp;<a href="#">第一个热搜第一个热搜</a>
            <span class="top">热</span>
        </div>
        <div>
            <span style="color: #9195a3;">4</span>
            &nbsp;&nbsp;<a href="#">第四个热搜第四个热搜</a>
        </div>
        <div>
            &nbsp;&nbsp;<span style="color: #f60;">2</span>
            &nbsp;&nbsp;<a href="#">第二个热搜第二个热搜</a>
            <span class="top">热</span>
        </div>
        <div>
            <span style="color: #9195a3;">5</span>
            &nbsp;&nbsp;<a href="#">第五个热搜第五个热搜</a>
        </div>
    </div>
    <div class="footer">
        <a>关于百度</a>
        <a>About Baidu</a>
        <a>使用百度前必读</a>
        <a>帮助中心</a>
        <a>企业推广</a>
        <a>京公网安备11000002000001号</a>
        <a>京ICP证030173号</a>
        <a>信息网络传播视听节目许可证0110516</a>
        <span class="unique">互联网宗教信息服务许可证编号:京(2022)0000043</span>
    </div>
</body>

</html>

css样式

body {
    margin: 0;
    padding: 0;
    min-width: 1500px;
}

.nav {
    margin-top: 20px;
    width: 100%;
    font-size: 13px;
    height: 40px;
}

.nav a {
    margin-left: 20px;
    text-decoration: none;
    color: black;
}

.nav a:hover {
    color: #4c6fef;
}

.nav span, button {
    float: right;
    margin-right: 20px;
    cursor: pointer;
}

.nav span:hover {
    color: #4c6fef;
}

.nav button {
    background-color: #4c6fef;
    color: white;
    border-radius: 19%;
    margin-top: -3px;
    border: none;
    line-height: 23px;
}

.logos {
    text-align: center;
}

.logo {
    width: 263px;
}

.search {
    margin-top: 2%;
    position: relative;
    display: flex;
    justify-content: center;
}

.text {
    background: url(../img/search.png) right center no-repeat;
}

.search .text {
    width: 516px;
    height: 36px;
    border: 1px solid #a7aab4;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    outline: 1px solid #a7aab4;
}

.text:focus {
    outline: 1px solid #4c6fef;
}

.search .button {
    width: 105px;
    border: none;
    font-size: 16px;
    height: 42px;
    margin-top: -1px;
    color: white;
    background-color: #4d6ef1;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
}

.content {
    display: flex;
    flex-wrap: wrap;
    width: 45%;
    margin-left: 29%;
    margin-top: 4%;
    height: 13%;
    justify-content: space-evenly;
}

.one {
    width: 50%;
}

strong:hover {
    color: #4c6fef;
    cursor: pointer;
}

.two {
    color: #9195a3;
    width: 50%;
}

.two span {
    text-align: right;
    cursor: pointer;
}

.two span:hover {
    color: #4c6fef;
    cursor: pointer;
}



.content div {
    width: 50%;
    text-align: left;
    padding-top: 7px;
}

.content div a {
    text-decoration: none;
    color: black;
}

.content div a:hover {
    text-decoration: underline;
    color: #4c6fef;
}

.top {
    background-color: #f60;
    color: #fff;
    line-height: 26px;
    font-size: 13px;
    border-radius: 3px;
    padding: 1px 2px;
}

.footer {
    font-size: 6%;
    color: #a7aab4;
    text-align: center;
    position: absolute;
    bottom: 3%;
    width: 1500px;
}

.footer span, a {
    text-decoration: none;
    bottom: 3%;
    margin-left: 1%;
}

.unique:hover {
    cursor: default;
}

.footer a:hover {
    cursor: pointer;
    color: black;
}

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值