应用css 写的小型网页

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
*{
margin: 0;
padding: 0;

}
a{
text-decoration: none;


}
/* 默认所有的a 标签 全部没有下划线*/
body{
font-family: "times new roman";
font-size: 15px;

}

/* head 部分开始*/
.head-box{
background-color:#2459a2;
height: 44px;
width: 100%;
position: fixed;
top: 0;
left: 0;

}
.head-content{
width: 1016px;

height: 44px;
line-height: 44px;
margin: 0 auto;
position: relative;
}
    /* 框 居中 margin: 0 auto;*/
.head-content .logo{
display: inline-block;
background: url("images/2.png");
width: 193px;
height: 28px;
margin-top: 7px;
float: left;

}
/*a 标签是内联标签  不能设置长宽*/
.head-content .action-menu a.tb{
position: relative;
display: inline-block;
margin-left:20px;

padding: 0px ;

}
/*错误事项 两个属性元素之间 必须用空格 隔开 */


.head-content .atcion-menu a.tb:hover{
color: white;
        background-color: #396bb3;
   
}
.head-content .action-menu a.active{
color: white;
background-color: #204982;


}
.action-content .action-menu a.active:hover

color:white;
background-color:#204982 ;

}

.key-search{
float: right;
margin-top: -38px;
}

.key-search .search-text{
float: left;
width: 120px;
height: 25px;



}
.key-search a{
display: inline-block;
width:30px;
height: 28px;
background-color: #f4f4f4;

}
.key-search a span.ico{
       display: inline-block;
       width: 88px;
       height: 30px;
  background:url("images/3.jpg")no-repeat 0 -37px; 
       
}
.action-nav{
position: absolute;
right: 200px;
margin-top: -45px;
   
}

.action-nav a
           {
           display: inline-block;
           color: white;
            padding: 0 10px;
   
                  }
.action-nav a:hover

background-color: #396BB3;

}
                          /* content 部分开始*/




    /*overflow: hidden; 溢出的部分给它影藏起来*/
    /*(自适应):  最小高度 让它不显示单独一个小部分min-height: 700px;*/



/*对于属性下面有标签 后面 空格加标签名就行*/

/*给参照物定位 先进行 relative 在用 absolute*/

.main-content-box{
        background-color: lightgrey;
        padding-top: 44px;
    }


    .main-content{
        background-color: white;
        margin: 0 auto;
        width:1000px;
        height: auto!important;
        min-height: -100px;
        overflow: hidden;
            
    }




    .main-content .content-L{
        float: left;
        width: 630px;
        margin-top: 10px;
        margin-left: 5px;
    
    }


    .content-L .top-area{
        border-bottom: 1px solid #b4b4b4;
        height: 40px;
    
    }


    .top-area .child-nav{
        float: left;
      margin-top: -15px;
    }


    .top-area .child-nav a{
        display: inline-block;
        width: 60px;
        height: 26px;
        line-height: 65px;
        color: #369;
        text-align: center;
    }


    .top-area .child-nav .active{
        background: url("images/tip.png") no-repeat 0 -299px;
        color: black;
        font-weight: bolder;
    
    }


    .sort-nav{
        float: left;
        margin-left: 120px;
        margin-top: 7px;
    }


    .sort-nav a{
        display: inline-block;
        text-align: center;
        color: #390;
        margin-left: 10px;
    }


    .sort-nav .active{
        color: #b4b4b4;
    }


     .publish-btn{
         float: right;
         display: inline-block;
         width: 136px;
         height: 32px;
         background-color: #84a42b;
         color: white;
         font-size: 16px;
         text-align: center;
         line-height: 32px;
     }






     .content-list .item{
         border-bottom: 1px solid #b4b4b4;
         padding-top: 10px;
     }


     .content-list .item .news-pic{
         float: right;
     }


     .content-list .item .part1{
         line-height: 20px;
     }


     .content-list .item .part1:hover a.show-content{
         text-decoration: underline;
     }
   /*首先 让 a 标签浮在 part1上   后面浮在前面上   */


    .content-list .item .part2{
         padding: 10px 0;
        color: #99aecb;
    }




    .part2 .hand-icon{
        background: url("images/icon_18_118.png") no-repeat 0 0;
        display: inline-block;
        width: 18px;
        height: 18px;
    }




    .part2 .icon-recommend{
          background-position: 0 -40px;


    }


    .part2 .recommend:hover .icon-recommend{
        background-position: 0 -20px;
    }


     .part2 .icon-discuss{
          background-position: 0 -100px;


    }


    .part2 .discuss:hover .icon-discuss{
        background-position: 0 -80px;
    }


     .part2 .icon-collect{
          background-position: 0 -160px;


    }


    .part2 .collect:hover .icon-collect{
        background-position: 0 -140px;
    }




    .part2 a{
        margin-left: 8px;
    }




    .part2 a b,.part2 span i{
        vertical-align: 4px;
        font-size: 14px;
    }
 /*  垂直根据vertical-align: 4px;*/


    .share-site-to{
        float: right;
    }


    .share-site-to .share-icon a{
        display: inline-block;
        background: url("images/share_icon.png") no-repeat 0 0;
        opacity: .3;
    }




    .share-icon a.icon-sina{
        background-position: 0 -90px;
        width: 17px;
        height: 14px;
    }


    .share-icon a.icon-douban{
        background-position: 0 -105px;
        width: 17px;
        height: 14px;
    }




    .share-icon a.icon-qqzone{
        background-position: 0 -120px;
        width: 17px;
        height: 14px;
    }






    .share-icon a.icon-renren{
        background-position: 0 -151px;
        width: 17px;
        height: 14px;
    }






    .share-icon a.icon-tenxun{
        background-position: 0 -136px;
        width: 17px;
        height: 14px;
    }




    .share-site-to {
        display: none;
    }
    .item:hover .share-site-to{
        display: inline-block;
    }


    .share-site-to .share-icon a:hover{
        opacity: 1;
    }


    .page-area ul li{
        display: inline-block;
    }


     .page-area ul li a{
            display: inline-block;
            /*float: left;*/
            color: #369;
            height: 34px;
            line-height: 34px;
            text-align: center;
            width: 34px;
            border: 1px solid #e1e1e1;
            border-radius: 15%;
            margin-left: 5px;
     }


     .page-area ul li a.page-next{
         width: 90px;
     }
      .page-area ul li a:hover{
          background-color: #369;
          color: white;
      }


      .page-area{
          margin-left: 50px;
      }
      
     .main-content .content-R{
          float: left;
        }






.footer-box {
                clear: both;
                margin: 0 auto;
                width: 960px;
                background-color: #fff;
                border-top:1px solid #dce7f4;;
            }


       .footer-box .foot-nav {
                padding-top: 15px;
                text-align: center;
                border-top: 1px solid #ccdcef;
                /*position: relative;*/
            }


        .footer-box .foot-nav2 {
            margin-top: 6px;
            margin-bottom: 15px;
            text-align: center;
        }


        .foot_b {
                color: #999;
                font-size: 12px;
            }



























</style>




</head>
<body>
 <div class="head-box">
  <div class="head-content">
  <a href="#" class="logo"></a>
  <div class="action-menu">
  <a href="#" class="tb active">全部</a>
  <a href="#" class="tb">42区</a>
  <a href="#" class="tb">段子</a>
  <a href="#" class="tb">图片</a>
  <a href="#" class="tb">搞笑</a>
  <a href="#" class="tb">你问我答</a>
  </div>
  <div class="key-search">
  <form action="/"method="post">
  <input type="text" class="search-text">
  <a href="#" class="i">
  <span class="ico"></span>
  </a>
  </form>
  </div>
  <div class="action-nav">
  <a href="#" class="register-btn">注册</a>
  <a href="#" class="login-btn">登录</a>
  </div>
  </div>
 </div>
<div class="main-content-box">
<div class="main-content"></div>
</div>
<div class="main-content-box">


    <div class="main-content">


        <div class="content-L">


            <div class="top-area">


<div class="child-nav">


<a href="#"  class="hotbtn active" >最热</a>
<a href="#"  class="newbtn"    >最新</a>
<a href="#"  class="personbtn" >人类发布</a>


</div>


<div class="sort-nav">
<a href="#"  class="sortbtn active" >即时排序</a>
<a href="#"  class="newbtn" >24小时</a>
<a href="#"  class="newbtn" >3天</a>
</div>


<a href="#" class="publish-btn">
                    <span class="n2">+ &nbsp;&nbsp;发布</span>
</a>


</div>


            <div class="content-list">




                  <div class="item">


   <div class="news-pic">
<img src="images/news.jpg" alt="抽屉新热榜">
</div>


<div class="news-content">
<div class="part1">
<a href="#" class="show-content" target="_blank">
                                                @大脸撑在小胸:刚在以色列大使馆经历史上最严的安检。过完常规扫描还有二
                                        次安检,包里所有东西都掏出来,唇膏拧开,粉盒打开,润喉糖打开,钱包里所有卡和钱摸
                                        一遍,纸巾摸一遍,包包链子每一个扣都仔细摸过。对方一直说还有东西但找不到,我都慌
                                        了以为被人偷放了,最后终于从小袋角落摸出一颗不知何时掉的维生素。
</a>


<span class="content-source">-ww4.sinaimg.cn</span>
<a href="#" class="n2">
                                            <span class="content-kind">42区</span>
                                        </a>
</div>


<div class="part2">




<a href="#" class="recommend" title="推荐">
<span class="hand-icon icon-recommend"></span>
<b>4</b>
       </a>




   <a href="javascript:;" class="discuss">
<span class="hand-icon icon-discuss"></span>
<b>5</b>
</a>




<a href="javascript:;" class="collect" title="加入私藏">
<span class="hand-icon icon-collect"></span>
<b>私藏</b>
</a>




<a href="#" class="user-a">
<span>
<img src="images/13.png">
</span>
<b>乱太郎</b>
</a>


<span class="left time-into">
<a class="time-a" href="#" target="_blank">
   <b>4分钟前</b>
</a>
<i>入热榜</i>
</span>


                                    <span class="share-site-to">
                                        <i>分享到</i>
                                        <span class="share-icon">
                                            <a class="icon-sina"    title="分享到新浪微博" href="#" ></a>
                                            <a class="icon-douban"  title="分享到豆瓣"    href="#" ></a>
                                            <a class="icon-qqzone"  title="分享到QQ空间"  href="#" ></a>
                                            <a class="icon-tenxun"  title="分享到腾讯微博" href="#" ></a>
                                            <a class="icon-renren"  title="分享到人人网"   href="#" ></a>


                                        </span>
                                    </span>


</div>
</div>


                  </div>
                  <div class="item">


   <div class="news-pic">
<img src="images/news.jpg" alt="抽屉新热榜">
</div>


<div class="news-content">
<div class="part1">
<a href="#" class="show-content" target="_blank">
                                                @大脸撑在小胸:刚在以色列大使馆经历史上最严的安检。过完常规扫描还有二
                                        次安检,包里所有东西都掏出来,唇膏拧开,粉盒打开,润喉糖打开,钱包里所有卡和钱摸
                                        一遍,纸巾摸一遍,包包链子每一个扣都仔细摸过。对方一直说还有东西但找不到,我都慌
                                        了以为被人偷放了,最后终于从小袋角落摸出一颗不知何时掉的维生素。
</a>


<span class="content-source">-ww4.sinaimg.cn</span>
<a href="#" class="n2">
                                            <span class="content-kind">42区</span>
                                        </a>
</div>


<div class="part2">




<a href="#" class="recommend" title="推荐">
<span class="hand-icon icon-recommend"></span>
<b>4</b>
       </a>




   <a href="javascript:;" class="discuss">
<span class="hand-icon icon-discuss"></span>
<b>5</b>
</a>




<a href="javascript:;" class="collect" title="加入私藏">
<span class="hand-icon icon-collect"></span>
<b>私藏</b>
</a>




<a href="#" class="user-a">
<span>
<img src="images/13.png">
</span>
<b>乱太郎</b>
</a>


<span class="left time-into">
<a class="time-a" href="#" target="_blank">
   <b>4分钟前</b>
</a>
<i>入热榜</i>
</span>
<!-- 分享各微博的按钮 -->


                                    <span class="share-site-to">
                                        <i>分享到</i>
                                        <span class="share-icon">
                                            <a class="icon-sina"    title="分享到新浪微博" href="#" ></a>
                                            <a class="icon-douban"  title="分享到豆瓣"    href="#" ></a>
                                            <a class="icon-qqzone"  title="分享到QQ空间"  href="#" ></a>
                                            <a class="icon-tenxun"  title="分享到腾讯微博" href="#" ></a>
                                            <a class="icon-renren"  title="分享到人人网"   href="#" ></a>
                                            <a class="share-none"> </a>


                                        </span>
                                    </span>


</div>
</div>


                  </div>
                  <div class="item">


   <div class="news-pic">
<img src="images/news.jpg" alt="抽屉新热榜">
</div>


<div class="news-content">
<div class="part1">
<a href="#" class="show-content" target="_blank">
                                                @大脸撑在小胸:刚在以色列大使馆经历史上最严的安检。过完常规扫描还有二
                                        次安检,包里所有东西都掏出来,唇膏拧开,粉盒打开,润喉糖打开,钱包里所有卡和钱摸
                                        一遍,纸巾摸一遍,包包链子每一个扣都仔细摸过。对方一直说还有东西但找不到,我都慌
                                        了以为被人偷放了,最后终于从小袋角落摸出一颗不知何时掉的维生素。
</a>


<span class="content-source">-ww4.sinaimg.cn</span>
<a href="#" class="n2">
                                            <span class="content-kind">42区</span>
                                        </a>
</div>


<div class="part2">




<a href="#" class="recommend" title="推荐">
<span class="hand-icon icon-recommend"></span>
<b>4</b>
       </a>




   <a href="javascript:;" class="discuss">
<span class="hand-icon icon-discuss"></span>
<b>5</b>
</a>




<a href="javascript:;" class="collect" title="加入私藏">
<span class="hand-icon icon-collect"></span>
<b>私藏</b>
</a>




<a href="#" class="user-a">
<span>
<img src="images/13.png">
</span>
<b>乱太郎</b>
</a>


<span class="left time-into">
<a class="time-a" href="#" target="_blank">
   <b>4分钟前</b>
</a>
<i>入热榜</i>
</span>
<!-- 分享各微博的按钮 -->


                                    <span class="share-site-to">
                                        <i>分享到</i>
                                        <span class="share-icon">
                                            <a class="icon-sina"    title="分享到新浪微博" href="#" ></a>
                                            <a class="icon-douban"  title="分享到豆瓣"    href="#" ></a>
                                            <a class="icon-qqzone"  title="分享到QQ空间"  href="#" ></a>
                                            <a class="icon-tenxun"  title="分享到腾讯微博" href="#" ></a>
                                            <a class="icon-renren"  title="分享到人人网"   href="#" ></a>
                                            <a class="share-none"> </a>


                                        </span>
                                    </span>


</div>
</div>


                  </div>
                  <div class="item">


   <div class="news-pic">
<img src="images/news.jpg" alt="抽屉新热榜">
</div>


<div class="news-content">
<div class="part1">
<a href="#" class="show-content" target="_blank">
                                                @大脸撑在小胸:刚在以色列大使馆经历史上最严的安检。过完常规扫描还有二
                                        次安检,包里所有东西都掏出来,唇膏拧开,粉盒打开,润喉糖打开,钱包里所有卡和钱摸
                                        一遍,纸巾摸一遍,包包链子每一个扣都仔细摸过。对方一直说还有东西但找不到,我都慌
                                        了以为被人偷放了,最后终于从小袋角落摸出一颗不知何时掉的维生素。
</a>


<span class="content-source">-ww4.sinaimg.cn</span>
<a href="#" class="n2">
                                            <span class="content-kind">42区</span>
                                        </a>
</div>


<div class="part2">




<a href="#" class="recommend" title="推荐">
<span class="hand-icon icon-recommend"></span>
<b>4</b>
       </a>




   <a href="javascript:;" class="discuss">
<span class="hand-icon icon-discuss"></span>
<b>5</b>
</a>




<a href="javascript:;" class="collect" title="加入私藏">
<span class="hand-icon icon-collect"></span>
<b>私藏</b>
</a>




<a href="#" class="user-a">
<span>
<img src="images/13.png">
</span>
<b>乱太郎</b>
</a>


<span class="left time-into">
<a class="time-a" href="#" target="_blank">
   <b>4分钟前</b>
</a>
<i>入热榜</i>
</span>
<!-- 分享各微博的按钮 -->


                                    <span class="share-site-to">
                                        <i>分享到</i>
                                        <span class="share-icon">
                                            <a class="icon-sina"    title="分享到新浪微博" href="#" ></a>
                                            <a class="icon-douban"  title="分享到豆瓣"    href="#" ></a>
                                            <a class="icon-qqzone"  title="分享到QQ空间"  href="#" ></a>
                                            <a class="icon-tenxun"  title="分享到腾讯微博" href="#" ></a>
                                            <a class="icon-renren"  title="分享到人人网"   href="#" ></a>
                                            <a class="share-none"> </a>


                                        </span>
                                    </span>


</div>
</div>


                  </div>
                  <div class="item">


   <div class="news-pic">
<img src="images/news.jpg" alt="抽屉新热榜">
</div>


<div class="news-content">
<div class="part1">
<a href="#" class="show-content" target="_blank">
                                                @大脸撑在小胸:刚在以色列大使馆经历史上最严的安检。过完常规扫描还有二
                                        次安检,包里所有东西都掏出来,唇膏拧开,粉盒打开,润喉糖打开,钱包里所有卡和钱摸
                                        一遍,纸巾摸一遍,包包链子每一个扣都仔细摸过。对方一直说还有东西但找不到,我都慌
                                        了以为被人偷放了,最后终于从小袋角落摸出一颗不知何时掉的维生素。
</a>


<span class="content-source">-ww4.sinaimg.cn</span>
<a href="#" class="n2">
                                            <span class="content-kind">42区</span>
                                        </a>
</div>


<div class="part2">




<a href="#" class="recommend" title="推荐">
<span class="hand-icon icon-recommend"></span>
<b>4</b>
       </a>




   <a href="javascript:;" class="discuss">
<span class="hand-icon icon-discuss"></span>
<b>5</b>
</a>




<a href="javascript:;" class="collect" title="加入私藏">
<span class="hand-icon icon-collect"></span>
<b>私藏</b>
</a>




<a href="#" class="user-a">
<span>
<img src="images/13.png">
</span>
<b>乱太郎</b>
</a>


<span class="left time-into">
<a class="time-a" href="#" target="_blank">
   <b>4分钟前</b>
</a>
<i>入热榜</i>
</span>
<!-- 分享各微博的按钮 -->


                                    <span class="share-site-to">
                                        <i>分享到</i>
                                        <span class="share-icon">
                                            <a class="icon-sina"    title="分享到新浪微博" href="#" ></a>
                                            <a class="icon-douban"  title="分享到豆瓣"    href="#" ></a>
                                            <a class="icon-qqzone"  title="分享到QQ空间"  href="#" ></a>
                                            <a class="icon-tenxun"  title="分享到腾讯微博" href="#" ></a>
                                            <a class="icon-renren"  title="分享到人人网"   href="#" ></a>
                                            <a class="share-none"> </a>


                                        </span>
                                    </span>


</div>
</div>


                  </div>
                  <div class="item">


   <div class="news-pic">
<img src="images/news.jpg" alt="抽屉新热榜">
</div>


<div class="news-content">
<div class="part1">
<a href="#" class="show-content" target="_blank">
                                                @大脸撑在小胸:刚在以色列大使馆经历史上最严的安检。过完常规扫描还有二
                                        次安检,包里所有东西都掏出来,唇膏拧开,粉盒打开,润喉糖打开,钱包里所有卡和钱摸
                                        一遍,纸巾摸一遍,包包链子每一个扣都仔细摸过。对方一直说还有东西但找不到,我都慌
                                        了以为被人偷放了,最后终于从小袋角落摸出一颗不知何时掉的维生素。
</a>


<span class="content-source">-ww4.sinaimg.cn</span>
<a href="#" class="n2">
                                            <span class="content-kind">42区</span>
                                        </a>
</div>


<div class="part2">




<a href="#" class="recommend" title="推荐">
<span class="hand-icon icon-recommend"></span>
<b>4</b>
       </a>




   <a href="javascript:;" class="discuss">
<span class="hand-icon icon-discuss"></span>
<b>5</b>
</a>




<a href="javascript:;" class="collect" title="加入私藏">
<span class="hand-icon icon-collect"></span>
<b>私藏</b>
</a>




<a href="#" class="user-a">
<span>
<img src="images/13.png">
</span>
<b>乱太郎</b>
</a>


<span class="left time-into">
<a class="time-a" href="#" target="_blank">
   <b>4分钟前</b>
</a>
<i>入热榜</i>
</span>
<!-- 分享各微博的按钮 -->


                                    <span class="share-site-to">
                                        <i>分享到</i>
                                        <span class="share-icon">
                                            <a class="icon-sina"    title="分享到新浪微博" href="#" ></a>
                                            <a class="icon-douban"  title="分享到豆瓣"    href="#" ></a>
                                            <a class="icon-qqzone"  title="分享到QQ空间"  href="#" ></a>
                                            <a class="icon-tenxun"  title="分享到腾讯微博" href="#" ></a>
                                            <a class="icon-renren"  title="分享到人人网"   href="#" ></a>
                                            <a class="share-none"> </a>


                                        </span>
                                    </span>


</div>
</div>


                  </div>


</div>


            <div class="page-area">
                 <ul>
                     <li><span class="current_page">1</span></li>
                     <li><a href="#" class="page-a">2</a></li>
                     <li><a href="#" class="page-a">3</a></li>
                     <li><a href="#" class="page-a">4</a></li>
                     <li><a href="#" class="page-a">5</a></li>
                     <li><a href="#" class="page-a">6</a></li>
                     <li><a href="#" class="page-a">7</a></li>
                     <li><a href="#" class="page-a">8</a></li>
                     <li><a href="#" class="page-a">9</a></li>
                     <li><a href="#" class="page-a">10</a></li>
                     <li><a href="#" class="page-a page-next">下一页</a></li>
                 </ul>
</div>


        </div>


        <div class="content-R"></div>


        <div class="footer-box">
<div class="foot-nav">
            <a href="#" target="_blank">关于我们</a>
<span>|</span>
<a href="#" target="_blank">联系我们</a>
<span>|</span>
<a href="#" target="_blank">服务条款</a>
<span>|</span>
<a href="#" target="_blank">隐私政策</a>
<span>|</span>
<a href="#" target="_blank">抽屉新热榜工具</a>
<span>|</span>
<a href="#" target="_blank">下载客户端</a>
<span>|</span>
<a href="#" target="_blank">意见与反馈</a>
<span>|</span>
<a href="#" target="_blank">友情链接</a>
<span>|</span>
<a href="#" target="_blank">公告</a>
        <a href="#"  style="margin-left:0;vertical-align:-2px;">
<img src="images/ct_rss.gif" width="36" height="14">
</a>
        </div>


        <div class="foot-nav2">
            <a target="_blank" href="#">
                <img class="foot_e" src="images/footer1.gif" width="36" height="14">
            </a>
            <span class="foot_d">旗下站点</span>
            <span class="foot_a">©2016chouti.com</span>
            <a target="_blank" href="#" class="foot_b">京ICP备09053974号-3 京公网安备 110102004562</a>
            <div style="margin-top:6px;">版权所有:北京格致璞科技有限公司</div>


        </div>
</div>


    </div>


</div>








</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值