发表于: 2019-10-12 07:17:46

1 933


今天完成的事

1.根据网上的思路解决git的账号密码问题 成功将修改推送到gitee


2.码云需要手动重新部署更新pages服务来更新网站 git是自动更新

后面看到了自动更新pages是收费服务


3.继续完成护工列表在less中的样式架构


4.重新优化架构单行

<div class="p">
        <span class="span1">服务日期</span>
        <div class="pp">
            <p1 class="t1 text">
                2015-7-5至2015-7-12
            </p1>
            <p1 class="t2 text">
                25元/小时
            </p1>
        </div>
        <span class="span2">北京.通州.果园</span>
    </div>


5.在less中添加样式

.div1 {
    .flex;
    flex-directioncolumn;
    padding100px 0px 50px 0px;
    margin0px;
    overflow-yhidden;
    z-index-1;
    .p {
        .widht(100%);
        .border-silver;
        padding20px 0 19px 0;
        span {
            .flex;
            .widht(0);
            flex-directioncolumn;
            height20px;
            background-imageurl(列表页.png);
            background-repeatno-repeat;
            background-size400px;
        }
        .span1 {
            background-position-10px 5px;
            white-spacenowrap;
            padding-left25px;
            colorsilver;
        }
        div {
            .flex;
            .widht(100%);
            justify-contentspace-between;
            padding-left26px;
            overflowhidden;
            text-overflowellipsis;
            white-spacenowrap;
            line-height21px;
            font-size0;
            padding-top4px;
            .text {
                .block;
                overflowhidden;
                white-spacenowrap;
                text-overflowellipsis;
                vertical-alignmiddle;
            }
            .t1 {
                font-size14px;
                height16px;
            }
            .t2 {
                font-size16px;
                colorred;
                background-imageurl(矢量智能对象.png);
                background-repeatno-repeat;
                background-position80px;
                padding-right70px;
            }
        }
        span {
            background-position-10px -50px;
            white-spacenowrap;
            padding-left25px;
            colorsilver;
        }
    }
}


6.重新优化架构footer部分

<footer class="footer">
    <input type="submit" value="首页">
    <input class="i2" type="submit" value="">
    <input class="i3" type="submit" value="我的">
</footer


7.添加样式

.footer {
    .inline-flex;
    .fixed;
    .widht(100%);
    .height(60px);
    bottom0px;
    background-colorrgb(248250251);
    align-itemscenter;
    justify-contentspace-around;
    input {
        .pointer;
        margin-top20px;
        height100%;
        backgroundurl("home.png") no-repeat center top;
        background-size20px;
        font-size10px;
        bordersolid rgb(248250251)
    }
    .i2 {
        margin0px;
        width60px;
        backgroundurl("task5.jpg") no-repeat center top;
        background-size50px;
    }
    .i3 {
        backgroundurl("man.png") no-repeat center top;
        background-size20px;
    }

}


8.优化less中的代码并将公用类添加到单独less文件中


.back-s(@back-s) {
    background-size@back-s;
}
.bcak-no-r {
    background-repeatno-repeat;
}
.back-size(@back-size) {
    background-size@back-size;
}
.back-pos(@back-pos) {
    background-position@back-pos;
}


9.在设置中添加修改选中行的颜色 设为白色


10.开始个人主页部分


11.架构个人主页header部分

<header>
    <div>
        <
    </div>
    <div>
        个人主页
    </div>
</header>


12.添加样式

header {
    .widht(100%);
    background-colorrgb(95192205);
    .fixed;
    .height(50px);
    div {
        margin-top12px;
        .absolute;
        colorwhite;
        font-size18px;
        left10px;
    }
    .text {
        left50%;
        margin-left-28px;
        font-size14px;
        margin-top14px;
    }
}



明天的计划

1.看看列表页面的less有没有其他能继续改进的地方

2.架构个人主页页面并添加less样式

3.提交任务12





遇到的问题

1.输入了错误的git密码导致无法push

https://jingyan.baidu.com/article/870c6fc37ca5feb03fe4beab.html

根据这篇文章的思路在凭据管理器里修改默认的密码

后面成功push到码云

2.因为less支持结构化的样式布置 不知不觉就习惯用元素选择器很多次

后面发觉这样总是带来各种各样的问题

比如样式污染等等

看来还是要保持使用类选择器的优良习惯




今天的收获

1.less和sass这类预处理语言在小批量代码上代码量不比单纯的CSS少多少

在大批量的代码环境下才会带来显著的代码量优势

不过无论在什么环境下 维护时树状结构化能快速的定位样式位置这个优点是非常明显的







返回列表 返回列表
评论

    分享到