发表于: 2018-10-14 16:52:38

1 613


今天完成的事情  任务6基本完成了希望能一次过,哈哈


明天计划的事情:任务7   学习CSS框架Bootstrap

遇到的问题: 设置左边的文字被截断出现”…”省略号     

    overflow: hidden;           /*设置溢出的位隐藏*/

    text-overflow: ellipsis;    /*文字溢出的用省略号显示*/


  下拉框和倒三角一直不能实现垂直居中并间隔一大空间

   一开始布局相对定位的但是下滑滚动条倒三角就浮出来了

   后来更更改改就好了,

<div class="drop-down-lists">

        <div class="frame">

                    <p>所在地<b></b></p>

                </div>

                <div class="hide">

                    <a href="#">果园</a>

                    <a href="#">宋庄镇</a>

                    <a href="#">西集镇</a>

        </div>

 </div>



.drop-down{

    display: flex;

    align-items: center;

    height: 3rem;

    border-bottom: .1rem solid #e1e5e7;

}

.frame{

    text-align: center;

    margin-top: -1rem;

    width: 100%;

    height: 1.5rem;

    border-right: .01rem solid #e1e5e7;

}

  

b{

    float: right;

    margin-top: .5rem;

    width: 0;

    height: 0;

    border-width: 5px;  

    border-style: solid dashed dashed;

    border-color: #afbac0 transparent transparent;

}


收获:加深了对display: flex的了解,知道自己的布局还是有先当大改善的空间。


返回列表 返回列表
评论

    分享到