项目实训1-导航栏与底部

一。项目功能
在这里插入图片描述

1.创建空白项目【blog】
在这里插入图片描述

2。开始编写页面
	(1)导航栏
<nav class="ui inverted attached segment m-padded-tb-mini">
        <div class="ui container">
            <div class="ui inverted secondary menu">
                <h2 class="ui teal header item">Blog</h2>
                <a href="#" class="item"><i class="home icon"></i> 首页</a>
                <a href="#" class="item"><i class="idea icon"></i>分类</a>
                <a href="#" class="item"><i class="tags icon"></i>标签</a>
                <a href="#" class="item"><i class="info icon"></i>关于我</a>
                <div class="right item">
                    <div class="ui icon inverted transparent input">
                        <input type="text" placeholder="Search....">
                        <i class="search link icon"></i>
                    </div>
                </div>
            </div>
        </div>

    </nav>

(2底部的)

将图片放入images的目录下

在这里插入图片描述

<footer class="ui inverted vertical segment m-padded-tb-massive">
        <div class="ui center aligned container">
            <div class="ui inverted divided grid">
                <div class="three wide column">
                    <div class="ui inverted link list">
                        <div class="item">
                            <img src="images/a.jpg" class=" ui rounded image" alt="" style="width: 110px">
                        </div>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced ">最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">用户故事(User Story</a>
                        <a href="#" class="item">冠以刻意练习的清单</a>
                        <a href="#" class="item">失败要趁早</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced ">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">Email1440206921@qq.com</a>
                        <a href="#" class="item">QQ:1440206921</a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced ">Blog</h4>
                    <p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客、会分享关于编程、写作、思考相关的任何内容,希望可以给来到这的人有所帮助...</p>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright  2016 - 2017 Lirenmi Designed by Lirenmi</p>
        </div>
3.创建的css样式

body {
    background: url("../images/bg.png");
}

.m-padded-mini {
    padding: 0.2em !important;
}

.m-padded-tiny {
    padding: 0.3em !important;
}
.m-padded {
    padding: 1em !important;
}
.m-padded-tb-mini {
    padding-top: 0.2em !important;
    padding-bottom: 0.2em !important;
}
.m-padded-tb-tiny {
    padding-top: 0.3em !important;
    padding-bottom: 0.3em !important;
}
.m-padded-tb-small {
    padding-top: 0.5em !important;
    padding-bottom: 0.5em !important;
}
.m-padded-tb {
    padding-top: 1em !important;
    padding-bottom: 1em !important;
}
.m-padded-tb-large {
    padding-top: 2em !important;
    padding-bottom: 2em !important;
}
.m-padded-tb-big {
    padding-top: 3em !important;
    padding-bottom: 3em !important;
}
.m-padded-tb-huge {
    padding-top: 4em !important;
    padding-bottom: 4em !important;
}
.m-padded-tb-massive {
    padding-top: 5em !important;
    padding-bottom: 5em !important;
}


.m-padded-lr-responsive {
    padding-left: 4em !important;
    padding-right: 4em !important;
}

/*-------text -----*/

.m-text {
    font-weight: 300 !important;
    letter-spacing: 1px !important;
    line-height: 1.8;
}
.m-text-thin {
    font-weight: 300 !important;
}
.m-text-spaced {
    letter-spacing: 1px !important;
}
.m-text-lined {
    line-height: 1.8;
}

/*-----margin------*/

.m-margin-top-small {
    margin-top:0.5em !important;
}
.m-margin-top {
    margin-top: 1em !important;
}
.m-margin-top-large {
    margin-top: 2em !important;
}

.m-margin-tb-tiny {
    margin-top: 0.3em !important;
    margin-bottom: 0.3em !important;
}

.m-margin-bottom-small {
    margin-bottom: 0.5em !important;

}

/*-----opacity------*/
.m-opacity-mini {
    opacity: 0.8 !important;
}
.m-opacity-tiny {
    opacity: 0.6 !important;
}
/*------position---*/

.m-right-top {
    position: absolute;
    top:0;
    right: 0;
}

/*------display------*/
.m-inline-block {
    display: inline-block !important;
}


/*-----container*/

.m-container {
    max-width: 72em !important;
    margin: auto !important;
}
.m-container-small {
    max-width: 60em !important;
    margin: auto !important;
}

/*------shadow------*/
.m-shadow-small {
    -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

/*------positon-----*/

.m-fixed {
    position: fixed !important;
    z-index: 10 !important;
}

.m-right-bottom {
    bottom: 0 !important;
    right: 0 !important;
}


/*-----color-----*/
.m-black {
    color: #333 !important;
}
.m-teal {
    color: #00B5AD !important;
}



.m-mobile-show {
    display: none !important;
}

@media screen and (max-width: 768px){
    .m-mobile-hide {
        display: none !important;
    }
    .m-mobile-show {
        display: block !important;
    }
    .m-padded-lr-responsive {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .m-mobile-lr-clear {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .m-mobile-wide {
        width: 100% !important;
    }
}

运行效果:
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值