发表于: 2019-11-12 22:49:36

1 906


今天完成的事情:任务八的第一个页面的响应式写了个大致
明天计划的事情:继续任务八
遇到的问题:把轮播框调整为自适应花费较长时间,最后还是还是靠bootstrap的js组件解决的
收获:代码部分的调整很麻烦,后来专门写了css文件直接引入进去感觉方便点

<link media="(max-width: 768px)" rel="stylesheet" href="gx.css">

屏幕小于768px就会引用这一个

下面是代码部分

html新添加部分

<p align="right" class="x1" style="margin: 0;">登录 ︱ 注册</p>

css部分

.d1{
    displaynone;
}
.x1{
    displayblock;
    
}

效果图

顶部消失,取而代之的时登录注册的右上角部分,下面的部分代码

html部分

 <div class="m1"><label id="menu1" for="menu"></label></div>
        <input id="menu" type="checkbox">

css部分

.d2{
    displaynone;
}
.d2 a{
    width100%;
    displayblock;
    margin0 auto;
}

#menu1{
    height50px;
    width50px;
    backgroundurl(./8/2.png);
    displayblock;
    
}
#menu:checked ~ .d2{
    displayblock;
}
.m1{
    displayflex;
    flex-directionrow-reverse;
}

效果图

使用纯css的方法实现点击下拉导航,点击图片暂时用其他的部分代替以后再完善。再下面部分的代码

.d6{
    height800px;
    flex-directioncolumn;
    align-itemscenter;
}
.dd6{
    flex-directioncolumn;
    align-itemscenter;
    height500px;
    bordernone;
}
.d8{
    flex-directioncolumn;
    align-itemscenter;
    height350px;
    justify-contentspace-around;
}
.d11{
    flex-directioncolumn;
    align-itemscenter;
}
.d12{
    displaynone;
}
.d14{
    flex-directioncolumn;
    align-itemscenter;
}
.db{
    flex-directioncolumn;
}
.zb{
    padding-left0px;
}
.db .yb p{
    text-alignleft!important;
}

基本拍成了一列,明天再调整宽度,效果图

明天继续写下面的部分


返回列表 返回列表
评论

    分享到