博主信息
博文 34
粉丝 1
评论 0
访问量 29612
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
HTML基础7作业08-20
theYon的博客
原创
762人浏览过

HTML基础7

主要知识点

1)html5新增的语义化标签

2)iframe标签的基本用法

3)圣杯布局的实战运用

笔记

微信图片_20180822090329.jpg

代码(文档管理)

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>文档管理</title>
</head>
<style>
    a{
        text-decoration: none;
    }
    .foot {
        text-align: center;
    }
    /*首页样式*/
    .foot a:first-child {
        width: 56px;
    }

    .foot a:last-child {
        width: 56px;
    }
    .foot a {
        display: inline-block;
        width: 28px;
        height: 24px;
        border: 1px solid #00abf0;
        margin-left:2px;
        line-height: 24px;
        color: #00abf0;

    }

    /*当前页样式*/
    .active {
        background-color: #00abf0;
        color: white !important;
    }

    .more {
        border: none;
    }

    h3{
        text-align: center;
    }

    ul{
        list-style: none;
    }
    ul li{
        display: block;
        height: 100px;
        overflow: hidden;
        background: #ccc;
        box-sizing: border-box;
        padding: 2px 5px;
        margin-bottom: 8px;
    }
    ul li img{
        float: left;
        margin-right: 8px;
    }
    ul li p{
        margin: 0;
        margin-bottom: 8px;
    }
    ul li .left_it{
        float: left
    }
    ul li .right_it{
        float: right;
        margin-right: 8px;
    }
    .right_it a{
        text-decoration: none;
    }
    .right_it a:nth-child(1){
        color: #00abf0;
    }
    .right_it a:nth-child(2){
        color: #E2381F;
    }

</style>
<body>
<h3>文档管理</h3>
<ul>
    <li>
        <p style="margin-left: 68px">文档标题 : Apple公司最新旗舰产品: iPhone X 系列手机隆重上市</p>
        <img src="./static/images/33.jpg" width="60">
        <div>
            <p>ID : 0001</p>
            <p>分类 : 手机</p>
        </div>
        <div>
            <a href="">编辑</a>&nbsp;|&nbsp;<a href="">删除</a>
        </div>
    </li>
    <li>
        <p style="margin-left: 68px">文档标题 : Apple公司最新旗舰产品: iPhone X 系列手机隆重上市</p>
        <img src="./static/images/33.jpg" width="60">
        <div>
            <p>ID : 0001</p>
            <p>分类 : 手机</p>
        </div>
        <div>
            <a href="">编辑</a>&nbsp;|&nbsp;<a href="">删除</a>
        </div>
    </li>
    <li>
        <p style="margin-left: 68px">文档标题 : Apple公司最新旗舰产品: iPhone X 系列手机隆重上市</p>
        <img src="./static/images/33.jpg" width="60">
        <div>
            <p>ID : 0001</p>
            <p>分类 : 手机</p>
        </div>
        <div>
            <a href="">编辑</a>&nbsp;|&nbsp;<a href="">删除</a>
        </div>
    </li>
    <li>
        <p style="margin-left: 68px">文档标题 : Apple公司最新旗舰产品: iPhone X 系列手机隆重上市</p>
        <img src="./static/images/33.jpg" width="60">
        <div>
            <p>ID : 0001</p>
            <p>分类 : 手机</p>
        </div>
        <div>
            <a href="">编辑</a>&nbsp;|&nbsp;<a href="">删除</a>
        </div>
    </li>
</ul>

<!--分页-->
<p>
    <a href="">首页</a>
    <a href="">1</a>
    <a href="">2</a>
    <a href="">3</a>
    <a href="">4</a>
    <a href="">...</a>
    <a href="">尾页</a>
</p>
</body>
</html>

运行结果

11.png

代码(分类管理)

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>分类管理</title>
</head>
<style>
    button{
        border: none;
        background: none;
        height: 30px;
        width: 50px;
        color: #fff;
    }
    td button:nth-child(1){
        background: #00EEEE;
        margin-right: 15px;
    }
    td button:nth-child(2){
        background: red;
    }
    table{
        width: 700px;
        margin: 0 auto;
        border-collapse: collapse;
    }
    th{
        background: #43CD80
    }
    th,td{
        padding: 10px 0;
        text-align: center;
        border: 1px solid #ccc;
    }
    table tr td:nth-child(4){
        width: 120px;
    }

    a{
        text-decoration: none;
    }
    .foot {
        text-align: center;
    }
    /*首页样式*/
    .foot a:first-child {
        width: 56px;
    }

    .foot a:last-child {
        width: 56px;
    }
    .foot a {
        display: inline-block;
        width: 28px;
        height: 24px;
        border: 1px solid #00abf0;
        margin-left:2px;
        line-height: 24px;
        color: #00abf0;

    }

    /*当前页样式*/
    .active {
        background-color: #00abf0;
        color: white !important;
    }

    .more {
        border: none;
    }

    h3{
        text-align: center;
    }

    ul{
        list-style: none;
    }
    ul li{
        display: block;
        height: 100px;
        overflow: hidden;
        background: #ccc;
        box-sizing: border-box;
        padding: 2px 5px;
        margin-bottom: 8px;
    }
    ul li img{
        float: left;
        margin-right: 8px;
    }
    ul li p{
        margin: 0;
        margin-bottom: 8px;
    }
    ul li .left_it{
        float: left
    }
    ul li .right_it{
        float: right;
        margin-right: 8px;
    }
    .right_it a{
        text-decoration: none;
    }
    .right_it a:nth-child(1){
        color: #00abf0;
    }
    .right_it a:nth-child(2){
        color: #E2381F;
    }

</style>
<body>
<h3>分类管理</h3>

<table>
    <tr>
        <th>ID</th>
        <th>分类</th>
        <th>级别</th>
        <th>操作</th>
    </tr>
    <tr>
        <td>001</td>
        <td>家具</td>
        <td>一级</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
    <tr>
        <td>002</td>
        <td>家居</td>
        <td>一级</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
    <tr>
        <td>003</td>
        <td>家装</td>
        <td>一级</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
    <tr>
        <td>004</td>
        <td>厨具</td>
        <td>一级</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
</table>


<!--分页-->
<p>
    <a href="">首页</a>
    <a href="">1</a>
    <a href="">2</a>
    <a href="">3</a>
    <a href="">4</a>
    <a href="">...</a>
    <a href="">尾页</a>
</p>
</body>
</html>

运行结果

微信图片_20180822092320.png

代码(产品管理)

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>产品管理</title>
</head>
<style>
    button{
        border: none;
        background: none;
        height: 30px;
        width: 50px;
        color: #fff;
    }
    td button:nth-child(1){
        background: #00EEEE;
        margin-right: 15px;
    }
    td button:nth-child(2){
        background: red;
    }
    table{
        width: 700px;
        margin: 0 auto;
        border-collapse: collapse;
    }
    th{
        background: #43CD80
    }
    th,td{
        padding: 10px 0;
        text-align: center;
        border: 1px solid #ccc;
    }
    table tr td:nth-child(4){
        width: 120px;
    }

    a{
        text-decoration: none;
    }
    .foot {
        text-align: center;
    }
    /*首页样式*/
    .foot a:first-child {
        width: 56px;
    }

    .foot a:last-child {
        width: 56px;
    }
    .foot a {
        display: inline-block;
        width: 28px;
        height: 24px;
        border: 1px solid #00abf0;
        margin-left:2px;
        line-height: 24px;
        color: #00abf0;

    }

    /*当前页样式*/
    .active {
        background-color: #00abf0;
        color: white !important;
    }

    .more {
        border: none;
    }

    h3{
        text-align: center;
    }

    ul{
        list-style: none;
    }
    ul li{
        display: block;
        height: 100px;
        overflow: hidden;
        background: #ccc;
        box-sizing: border-box;
        padding: 2px 5px;
        margin-bottom: 8px;
    }
    ul li img{
        float: left;
        margin-right: 8px;
    }
    ul li p{
        margin: 0;
        margin-bottom: 8px;
    }
    ul li .left_it{
        float: left
    }
    ul li .right_it{
        float: right;
        margin-right: 8px;
    }
    .right_it a{
        text-decoration: none;
    }
    .right_it a:nth-child(1){
        color: #00abf0;
    }
    .right_it a:nth-child(2){
        color: #E2381F;
    }

</style>
<body>
<h3>产品管理</h3>

<table>
    <tr>
        <th>ID</th>
        <th>缩略图</th>
        <th>品*牌</th>
        <th>名称</th>
        <th>价格</th>
        <th>操作</th>
    </tr>
    <tr>
        <td>001</td>
        <td><img src="./static/images/33.jpg" width=50></td>
        <td>九阳</td>
        <td>豆浆机</td>
        <td>85</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
    <tr>
        <td>002</td>
        <td><img src="./static/images/33.jpg" width=50></td>
        <td>美的</td>
        <td>冰箱</td>
        <td>1000</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
    <tr>
        <td>003</td>
        <td><img src="./static/images/33.jpg" width=50></td>
        <td>格力</td>
        <td>空调</td>
        <td>600</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
    <tr>
        <td>004</td>
        <td><img src="./static/images/33.jpg" width=50></td>
        <td>三星</td>
        <td>电视</td>
        <td>3000</td>
        <td><button>编辑</button><button>删除</button></td>
    </tr>
</table>


<!--分页-->
<p>
    <a href="">首页</a>
    <a href="">1</a>
    <a href="">2</a>
    <a href="">3</a>
    <a href="">4</a>
    <a href="">...</a>
    <a href="">尾页</a>
</p>
</body>
</html>

运行结果

微信图片_20180822093206.png

总结

    试着模仿老师写的后台界面,发现布局上还是不够熟练,接下几天也会继续练习,巩固这些知识点

批改状态:合格

老师批语:
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学