CCS实例,网页栏目

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>这是标题</title>
    <style type="text/css">
        #title {

            width: 1015px;
            height: 50px;
            background-color: #e8e7e3;
            color: gray;
            font-weight: 500;
            font-family: 'Microsoft YaHei', Arial, Helvetica, sans-serif;

            position: absolute;

            left: 50%;
            margin-top: 40px;
            margin-left: -605px;

        }

        .one {

            padding-top: 15px;
            margin:0px 5px 0px 5px;
            float: left;
            display: block;

            background-color: darkgrey;
            text-align: center;

            width: 135px;
            height: 35px;
        }

        .one:hover {
            background-color: royalblue;
            color: white;
        }
    </style>
</head>
<body>
<div id="title">

    <div class="one">HTML/CSS</div>
    <div class="one">JavaScript</div>
    <div class="one">Server Side</div>
    <div class="one">ASP.NET</div>
    <div class="one">XML</div>
    <div class="one">Web Servies</div>
    <div class="one">Web Building</div>
</div>
</body>
</html>

 

posted @ 2017-10-02 17:37  bingxingc  阅读(201)  评论(0编辑  收藏  举报