weaknesss 2021-09-22 16:17 采纳率: 66.7%
浏览 59

html文件中2个页面使用一样的css布局,但是表现不一样

可在QQ浏览器上正常打开,在微信的内置浏览器、夸克、iPhone的QQ等则产品页字体被遮挡,百度说可能是某些浏览器的position:relative 失效
请问有什么解决方法,能使得正常显示吗?


 <section class="section page2" data-anchor="page2" style="background-color:#32313B;">
            <div class="section-content-container">
                <hgroup >
                    <h2 style="color: #ebe3e0;">系列产品</h2>
                    <h3 style="color: #ebe3e0; font-size: 2.7em;"> SERIES PRODUCTS</h3>
                </hgroup>
            <div class="slide-page2-wrap">
                <ul class="section-content product-list slide-page2-content">
                                    <li style="background-color: #4fbcdb;">
                                        <a href="product-1.html">
                                        <div class="top product-1" >
                                        </div>
                                        <div class="intro">
                                        <h3 style="font-size: 4em;color:#ebe3e0;">人工智能</h3>
                                        </div> 
                                        </a>
                                    </li>
                                    
    <style>
    .product-1{background-image:url(images/3.png);background-size: 70% 90%;}
    </style>                      
    
                                    <li style="background-color: #50c7a7;"> 
                                        <a href="product-2.html">
                                        <div class="top product-2">
                                        </div>
                                        <div class="intro">
                                        <h3 style="font-size: 4em;color:#ebe3e0;">智能影像云</h3>
                                        </div>
                                        </a>
                                    </li>
    <style width: 80px;height: 50px;>
    .product-2{background-image:url(images/1.png);background-size: 70% 90%;}
    </style>
                                    <li style="background-color: #ecae55;">
                                        <a href="product-3.html">
                                        <div class="top product-3">
                                        </div>
                                        <div class="intro">
                                        <h3 style="font-size: 4em; color:#ebe3e0;">医疗信息化</h3>
                                        </div>
                                        </a>
                                    </li>
    <style>
    .product-3{background-image:url(images/2.png);background-size: 70% 90%;}
    </style>
                                    <li style="background-color: #caca8b;">
                                       <a href="product-4.html">
                                       <div class="top product-4">
                                       </div>
                                       <div class="intro">
                                       <h3 style="font-size: 4em; color:#ebe3e0;">专科人工智能<br>解决方案</h3>
                                       </div>
                                       </a>
                                       </li>
<style>
.product-4{background-image:url(images/4.png);background-size: 70% 90%;}
</style>
                </ul>
          </div>      
    </div>
    </section>
    
    <section class="section page3" data-anchor="page3">
        <div class="section-content-container">
            <hgroup >
                <h2 style="color: black;">产品特色</h2>
                <h3 style="color: black; font-size: 2.7em;">FEATURE</h3>
            </hgroup>
        <div class="slide-page3-wrap">
            <ul class="section-content feature-list slide-page3-content">
                                <li>
                                    <div class="top feature-1" >
                                    </div>
                                    <div class="intro">
                                    <h3 style="color:#02baff;font-size: 3em;">安全</h3>
                                    <h4 style="color: #666666;font-size: 2em;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h4>
                                    </div> 
                                </li>
                                
<style>
.feature-1{background-image:url(images/feature-1.png);background-size: 70% 100%;}
</style>                      

                                <li>
                                    <div class="top feature-2">
                                    </div>
                                    <div class="intro">
                                    <h3 style="color:#02baff;font-size: 3em;">精确</h3>
                                    <h4 style="color: #666666;font-size: 2em;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h4>
                                    </div>
                                </li>
<style width: 80px;height: 50px;>
.feature-2{background-image:url(images/feature-2.png);background-size: 70% 100%;}
</style>
                                <li>
                                    <div class="top feature-3">
                                    </div>
                                    <div class="intro">
                                    <h3 style="color:#02baff;font-size: 3em;">智能</h3>
                                    <h4 style="color: #666666;font-size: 2em;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h4>
                                    </div>
                                </li>
<style>
.feature-3{background-image:url(images/feature-3.png);background-size: 70% 100%;}
</style>
                                <li>
                                   <div class="top feature-4">
                                   </div>
                                   <div class="intro">
                                   <h3 style="color:#02baff;font-size: 3em;">领先</h3>
                                    <h4 style="color: #666666;font-size: 2em;">xxxxxxxxxxxxxxxxxxxxxxxxxxxxx</h4>
                                   </div>
                                   </li>
<style>
.feature-4{background-image:url(images/feature-4.png);background-size: 70% 100%;}
</style>
            </ul>
      </div>      
</div>
</section>    


.page2 .section-content-container {
    width: 80%;
    height: 90%;
    margin: 5% auto 0;
    padding-top: 10%;
    position: relative;
    z-index: 1;
}
.page2 .section-content-container hgroup {
    margin: auto;
    text-align: center;
    letter-spacing: 2px;
    color: white;
    position: relative;

    opacity:1; 
    z-index: 10; 
}
.page2 .section-content-container hgroup h2 {
    text-transform: uppercase;
    font-weight: normal;
    color: white;
    font-size: 5em;
    top:10px; 
    margin-top: 50px;
   
}
.page2 .section-content-container hgroup h3 {

    margin-top: 10px;
    color: white;
}

.page2 .section-content {
    margin: 0;
    position: relative;
}
.slide-page2-wrap {           /*彩色框*/
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
.slide-page2-content {
    height: 100%;
    width: 100%;
    position: absolute;
}
.product-list li {
    height: 15%;
    list-style: none;
    width:100%;
    text-align: center;
    position: relative;
    margin-bottom: 5%;
    z-index: 1;
}
.product-list li .top { 
    width: 50%; 
    height: 100%;  
    padding: 10px 0;
    background-repeat: no-repeat;
    font-size: 15px;
    color: #333;
}
.product-list li .intro {
    font-size: 13px;
    width: 60%;
    color: #FFFFFF;
    top:-100%;
    left:35%;
    position: relative;
    overflow: hidden;
    font-weight: 700;
    z-index: 9999;
}
/*--------*/

/*特色页*/
.page3 .section-content-container {
    width: 80%;
    height: 90%;
    margin: 5% auto 0;
    padding-top: 10%;
    position: relative;
}
.page3 .section-content-container hgroup {
    margin: auto;
    text-align: center;
    letter-spacing: 2px;
    position: relative;
    opacity:1;  
}
.page3 .section-content-container hgroup h2 {
    text-transform: uppercase;
    font-weight: normal;
    font-size: 5em;
    top:10px; 
    margin-top: 50px;
   
}
.page3 .section-content-container hgroup h3 {

    margin-top: 10px;
}

.page3 .section-content {
    margin: 0;
    position: relative;
}
.slide-page3-wrap {       
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
.slide-page3-content {
    height: 100%;
    width: 100%;
    position: absolute;
}
.feature-list li {
    height: 18%;
    list-style: none;
    width:100%;
    text-align: center;
    position: relative;
    margin-bottom: 4%;
    background-color: rgb(214, 223, 241);
}

.feature-list li .top { 
    width: 50%;   
    height: 50%;
    padding: 10px 0 100px;
    background-repeat: no-repeat;
    font-size: 15px;
    color: #333;
}
.feature-list li .intro {
    font-size: 13px;
    width: 50%;
    color: #FFFFFF;
    top:-90%;
    left:40%;
    position: relative;
    overflow: hidden;
    font-weight: 700;
}

img

img

  • 写回答

3条回答 默认 最新

  • 普通网友 2021-09-22 16:37
    关注

    你需要适配,,每个浏览器都有不同的底层实现!

    评论

报告相同问题?

问题事件

  • 创建了问题 9月22日

悬赏问题

  • ¥15 如何在ns3中实现路径的自由切换
  • ¥20 SpringBoot+Vue3
  • ¥15 高额悬赏~绕过防火墙被针对了
  • ¥15 IT从业者的调查问卷
  • ¥65 LineageOs-21.0系统编译问题
  • ¥30 关于#c++#的问题,请各位专家解答!
  • ¥15 App的会员连续扣费
  • ¥15 不同数据类型的特征融合应该怎么做
  • ¥15 用proteus软件设计一个基于8086微处理器的简易温度计
  • ¥15 用联想小新14Pro