博主信息
博文 37
粉丝 0
评论 1
访问量 37226
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
前端框架手册封装
H先生
原创
991人浏览过

制作一个简单的前端框架手册封装


ui.png











实例

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>xiaoyuUI用户手册</title>
    <link rel="stylesheet" href="static/css/index.css">
</head>
<body>
<!--头部-->
<div class="xy-fluid" style="padding: 0">
    <div class="xy-row">
        <div class="xy-col-md-2 xy-bg-gray xy-p-10">
            <h1 class="xy-color-deepgreen xy-ml-40"><span class="xy-color-coral" style="text-shadow: 2px 2px 1px #333; font-weight: bolder;">xiaoyu UI</span>用户参考手册</h1>
        </div>
    </div>
    <div class="xy-nav">
        <div class="xy-col-md2 xy-col-sm2 xy-bg-eee">
            <ul class="xy-wd-2 xy-p-30 xy-lh-normal xy-ml-20"  id="nav" style="min-height: 800px">
                <li style="cursor:pointer;"><strong>前端基础</strong>
                    <ul class="xy-ml-20 xy-dl-n">
                        <li><a href="/base/1_框架安装"  target="content">框架安装</a></li>
                        <li><a href="/base/2_页面结构" target="content">页面结构</a></li>
                        <li><a href="/base/3_常用标签" target="content">常用标签</a></li>
                        <li><a href="/base/4_CSS选择器" target="content">CSS选择器</a></li>
                        <li><a href="/base/5_CSS样式选择器" target="content">CSS样式选择器</a></li>
                    </ul>
                </li>
            </ul>

    <p class="xy-mb-10 xy-tx-c"><a href="https://www.php.cn/">PHP中文网</a>©版权所有(2019)</p>
         </div>
        <div class="xy-col-md10 xy-col-sm10 xy-p-30" style="min-height: 800px;" id="content">
            <!--            文档内容区-->
            <iframe src="welcome.html" frameborder="0" name="content" width="100%" height="900"></iframe>
        </div>
    </div>

</div>




<script>
    // 控制导航折叠
    var menus = document.querySelectorAll('#nav > li');
    menus.forEach(function (menu){
        menu.firstElementChild.addEventListener('click', function (evt) {
            evt.target.nextElementSibling.classList.toggle('phpcn-dl-n');
        }, false);
    });
</script>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例




实例

body {
    margin: 0;
    padding: 0;
}
body {
    font: 14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/*头部流体写法*/
.xy-col-md-2 {
}

.xy-fluid {
    position: relative;
    margin: 0 auto;
    padding: 0 15px;
}

.xy-bg-gray {
    background-color: #d4d4d4 !important;
}

.xy-p-10 > * {
    padding: 10px;
}

.xy-row:after, .xy-row:before {
    content: '';
    display: block;
    clear: both;
}

.xy-color-deepgreen {
    color: #555;
}

.xy-color-coral {
    color: coral;
    padding: 15px;
}

.xy-ml-40 {
    margin-left: 40px !important;
    margin: 0;
}
/*内容列表*/

.xy-bg-eee {
    background-color: #eee;;
}

.xy-p-30 {
    padding: 30px;
}

.xy-lh-normal {
    line-height: 1.5rem;
}

.xy-ml-20  {
    margin-left: 20px !important;
}

.xy-dl-n {
    text-decoration-line: none;
}

div ul {
    margin: 0;
    padding: 0;
}

div ul li {
    list-style: none;
}

div li a {
    text-decoration: none;
    color: #333;
}

div .xy-nav {
    display: flex;
    flex: 0.2;
    justify-content: flex-start;
}

.xy-col-md10, .xy-col-sm10, .xy-p-30 {
    flex: .8;
}

.xy-p-30 {
    padding: 30px;
}

.xy-mt-30 {
    margin-top: 30px;
}

.xy-color-blue {
    color: #0880d7 !important;
}

.xy-color-deepgray {
    color: #555;
}

ul {
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

ul li {
    list-style: none;
}

.xy-ml-20 {
    margin-left: 20px;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例











批改状态:合格

老师批语:弹性布局用在这里了, 不错
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系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+教程免费学