仿UC头条首页-html+css+纯JS

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>仿UC头条</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,\\5FAE\8F6F\96C5\9ED1,Arial,sans-serif;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }
        body{
            padding-top: 75px;
            color: #333;
        }
        a{
            text-decoration: none;
            color: #333;
        }
        a:hover{
            color: #406599;
        }
        ul{
            list-style: none;
        }
        h3{
            font-weight: normal;
        }
        body>header{
            position: fixed;
            left: 0;
            top: 0;
            width: 100%;
            height: 50px;
            background: orange;
            z-index: 10;
        }
        .top_box{
            position: relative;
            width: 1140px;
            height: 50px;
            margin: 0 auto;
        }
        .top_box>h1{
            font-size: 0;
            position: absolute;
            left: 0;
            bottom: 3px;
            width: 102px;
            height: 44px;
            background: url("img/logo.png") no-repeat;
        }
        .top_box>a{
            position: absolute;
            right: 0;
            height: 50px;
        }
        .top_box>a:hover{
            color: #000;
        }
        .top_box>a>span{
            display: block;
            float: right;
            margin-top: 14px;
        }
        .top_box>a>.icon_down{
            float: left;
            margin-top: 10px;
        }

        .top_box>nav{
            position: absolute;
            top: 75px;
            left: 0;
            width: 140px;
            padding-right: 20px;
        }
        .top_box>nav>ul{
            text-align: center;
        }
        .top_box>nav>ul>li{
            height: 45px;
            line-height: 45px;
            margin-bottom: 2px;
        }
        .top_box>nav>ul>li>a{
            display: block;
            width: 100%;
            height: 100%;
            border: 1px solid transparent;
            border-radius: 4px;
        }
        .top_box>nav>ul>li>a:hover{
            background: orange;
            color: #000;
        }

        .top_box>#sideBox{
            display: none;
            background: #ffffff;
            position: absolute;
            top: 50px;
            right: 0;
            width: 260px;
            height: 500px;
            padding-top: 15px;
        }
        .top_box>#sideBox>#searchBox{
            margin-bottom: 10px;
        }
        .top_box>#sideBox>#erweima{
            background: #f5f5f5;
            padding: 15px 20px;
        }
        .top_box>#sideBox>#erweima img{
            width: 100%;
        }
        main{
            width: 1140px;
            height: 2222px;
            margin: 0 auto;
            padding-left: 140px;
        }

        .content{
            width: 710px;
            float: left;
        }
        .content>ul>li{
            position: relative;
            width: 100%;
            border-bottom: 1px solid #EEEEEE;
        }
        .content img{
            width: 170px;
            height: 109px;
        }
        .content h3{
            line-height: 30px;
            font-size: 20px;
            overflow: hidden;
        }
        .content .info{
            font-size: 14px;
            color: #CCC;
        }
        .content .info>span{
            margin-right: 10px;
        }
        .news_1{
            height: 140px;
        }
        .news_1>a>h3{
            position: absolute;
            left: 190px;
            top: 20px;
            width: 520px;
            height: 60px;
        }
        .news_1>a>img{
            position: absolute;
            left: 0;
            top: 10px;
        }
        .news_1>.info{
            position: absolute;
            left: 190px;
            top: 90px;

        }
        .news_2{
            height: 220px;
        }
        .news_2>a>h3{
            position: absolute;
            left: 0;
            top: 10px;
            width: 710px;
            height: 30px;
        }
        .news_2>a>div.pics{
            position: absolute;
            left: 0;
            top: 50px;
        }
        .news_2>.info{
            position: absolute;
            left: 0;
            top: 170px;
        }
        main>aside{
            width: 260px;
            float: right;
        }
        form{
            position: relative;
        }
        form>input{
            width: 100%;
        
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值