屏幕适配为什么没有起作用,有点乱

来源:4-7 返回顶部

慕函数8374494

2021-07-24 08:33:51

头部header和重要信息都有问题

http://img.mukewang.com/climg/60fb5ee209e58e0b06700613.jpg

相关代码:

header.css

.header{

    width100%;

    height100%

    displayflex;

    justify-contentcenter;

    align-itemscenter;

    /* background-color: yellow;  */

    transitionbackground 0.5s;   

}


/* 滑动后改变颜色 */

.header-transition{

    background-colorrgba(25,196,138,0.9);   

}

.header-nav{

    displayflex;

    align-itemscenter;

    width89.333333%;

    height17px;

    /* padding: 35px 20px;*/

.header-img-shape{

     margin-left274px;  

}   

content.art

<div class="content">

    <!-- 图片 -->

    <div class="content-img-layout">

        <img src="./content-bg.png" class="content-img" alt=""> 

    </div> 

     <!--重要信息  -->

    <div class="content-info">

        <h1 class="content-title">

            北京直飞福冈5天往返含税机票

        </h1>

        <div class="content-tags">

            <span>赠送接机</span>

            <span>赠当地游项目</span>    

        </div>

        <div class="content-counts">

            <span>浏览 24004</span>

            <span class="sold">已售138份</span>

        </div>

    </div>

</div>


content.css

 .content{

     width100%;

     height100%;

 }

 .content-img-layout{

     width100%;    

 }

 .content-img{

     width100%;

 }

 .content-info{

    width100%;

    background-colorpink

     align-itemscenter;

     padding16px 20px;

     border-bottom:2px solid #dadada ;

 }

 .content-info .content-title{

     width100%;

     font-size14px;

     color#333333;

     margin-bottom8px;

 }

 .content-tags span{

     padding5px 12px;

     border1px solid #5278A0;

     color#5278A0;

     font-size14px;

     margin-right12px;

 }

 .content-tags{

     margin-bottom12px;

 }

 .content-counts{

    width100%;

    font-size12px;

    color#999999;   

 }












写回答

1回答

好帮手慕星星

2021-07-24

同学你好,老师测试代码效果还可以,不知道指的是哪里的适配没有起作用呢?建议描述具体一些,便于帮助解决。

祝学习愉快!

0

0 学习 · 15276 问题

查看课程