跳转到主要内容
你行网

Main navigation

  • 首页
  • Drupal
  • 编程与开发
  • 数据库
  • 操作系统与应用
  • 服务器与运维
  • 社区
User account menu
  • 登录

面包屑

  1. 首页

CSS 基础学习-144 css 制作web布局实例

由 hrs, 2 十一月, 2021

实例代码:

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <style>
        .man_box{
          width:800px;
        }
        .top_head{
          height:150px;
          background-color:gray;
          font-size:30px;
          color:white;
          display:flex;
          justify-content:left;
          align-items:center;
          padding:10px;
        }
        .list_box{
          width:150px;
          float:left;
                  }
        ul{
            list-style-type:none;
            margin:0;
            padding:0;
        }
        li{
          margin-bottom:8px;
          padding:8px;
          background-color:#33b5eb;
        }
        a{
        text-align:left;  
        color:white;  
        text-decoration:none;
        }
        li:hover{
          background-color:blue;
        }          .content_box{
            width:650px;
            float:right;
          }
        .footer_box{
          display:flex;
          justify-content:left;
          align-items:center;
          background-color:gray;
          height:100px;
          color:white;
          clear:both;
          padding:10px;
        }
        .content_p{
          font-size:20px;
          text-indent:2em;
          padding:10px;
        }
    </style>
  </head>
  </body>
      <h1>web 布局实例</h1>
      <div class="man_box">
        <div class="top_head">
          <div>ShanHai</div>
        </div>
      <div class="list_box">
          <ul>
            <li><a href="https://www.dwoke.com">The Flight</a></li>
            <li><a href="https://www.dwoke.com">The City</a></li>
            <li><a href="https://www.dwoke.com">The Attractions</a></li>
            <li><a href="https://www.dwoke.com">The Food</a></li>  
          </ul>
    </div>
      <div class="content_box">
        <h1 style="text-align:center;">This Is Content Title!</h1>
        <p class="content_p">  this is some content. this is some content. this is some content. this is some content. this is some content. this is some content. this is some content. this is some content. this is some content. this is some content.this is some content.</p>
      </div>
      <div class="footer_box">
        <p class="fotter_p">Fotter text</p>
      </div>
      </div>
  </body>
</html>
                                                                                      


运行效果:

css-144.png

  • 登录或注册以发表评论

文章标签

  • CSS

评论

文章标签

CSS
Excel
ubuntu
php
vim
五笔
VPN
Linux
command
HTML
drupal 8
drupal 7
centos
composer
Mysql
模块(module)
drush
Drupal
JavaSrcipt
apache
英语
drupal 9
nerdtree
SEO
network
果树种植
surround
drupal10
主题(theme)
ssh
更多

相关文章

  • 如何去掉input和button标签中间有缝隙
  • CSS 基础学习-254 css使用 opacity 定义颜色
  • CSS 基础学习-253 css使用用 HSL 值定义颜色
  • CSS 基础学习-252 css使用RGBA 值定义颜色
  • CSS 基础学习-251 css使用background-clip属性
  • CSS 基础学习-250 css使用background-origin属性
  • CSS 基础学习-249 css使用不同的属性来创建背景图像
  • CSS 基础学习-248 css全尺寸背景图像
  • CSS 基础学习-247 css使用多个背景图像
  • CSS 基础学习-246 css使用contain和cover设置背景图像
RSS源

友情链接 网站地图 版权信息 联系我们 网址导航 社区

Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号