【问题标题】:Links inside a CSS scroll area using overflow; don't work [Android - PhoneGap/Cordova]使用溢出的 CSS 滚动区域内的链接;不工作 [Android - PhoneGap/Cordova]
【发布时间】:2015-06-01 14:53:12
【问题描述】:

我有一个使用 Phonegap 构建并由 PhoneGap Build 打包的应用程序

<!-- App -->
    <div class="app">

        <!-- Header -->
        <div id="header"> 
            <a href="index.html"><img src="logo.png" width="250px" /></a>
            <br>
            <h1>menu</h1>
        </div> 

        <!-- Content -->
        <div id="content">

            <a href="basic_index.html"><h2>basic</h2></a>
            <br><br>
            <a href="tools_index.html"><h2>tools</h2></a>
            <br><br>
            <a href="weapons_index.html"><h2>weapons</h2></a>
            <br><br>
            <a href="armour_index.html"><h2>armour</h2></a>
        </div> 

        <!-- Footer -->
        <div id="footer"> 
            Copyright 2015
        </div>

    </div>

还有 CSS...

html, body{
  height:100%;
}

body {
-webkit-touch-callout: none;                 
-webkit-text-size-adjust: none;              
-webkit-user-select: none;                  
background-color: #4a3424;
background-image: url(background.jpg);
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
font-weight: 300;
font-size:12px;
margin:0px;
padding:0px;
text-transform:lowercase;
overflow: hidden;
width:100%;
height:100%;
}

.app {
padding-top: 35px;
padding-left: 25px;
padding-right: 25px;
padding-bottom: 35px;
text-align: left;
overflow: hidden;
}

#header {

position:absolute;
margin-top: 40px;
margin-left: 25px;
margin-right: 25px;
top:0px; 
left:0px; 
height:135px; 
right:0px; 
overflow:hidden;
}

#content {

position:absolute; 
color: #FFFFFF;
margin-left: 25px;
margin-right: 25px;
top:205px; 
bottom:90px; 
left:0px; 
right:0px; 
overflow: scroll;
-webkit-overflow-scrolling: touch;
}

#footer {

position: absolute; 
background-color: #1e1e1e;
text-align: center;
bottom: 0px; 
height: 50px; 
left: 0px; 
right: 0px; 
overflow: hidden;
}

a {
text-decoration:none;
}

h1 {
font-size:40px;
font-weight: 700;
margin:0px;
overflow:visible;
padding:0px;
text-align:left;
color: #846142;
}

h2 {
font-size:24px;
font-weight: 400;
margin:0px;
overflow:visible;
padding:0px;
text-align:left;
color: #333;
}

滚动工作正常,但是当我在网络浏览器中运行“内容”内的链接时,它可以工作,但当我在我的 Android 手机上运行应用程序(由 PhoneGap Build 制作)时不起作用 - 未经测试的 iOS 或还没有赢得电话。

任何想法是什么导致了这种情况,甚至可能是解决方案?

谢谢

【问题讨论】:

  • 你能提供一个小提琴吗?
  • 认为小提琴并没有什么帮助,因为它适用于网络浏览器,只是在打包为应用程序时不起作用。
  • 然后上传 zip 并分享您的代码
  • 这是一个 android 4.3 的溢出问题。在 4.4 上工作正常
  • 你认为你所有的用户都有 4.4 ^^?

标签: android css cordova phonegap-build


【解决方案1】:

适用于 4.2(这对我来说已经足够了)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-21
    • 1970-01-01
    • 1970-01-01
    • 2012-07-16
    • 2012-09-17
    • 1970-01-01
    • 2017-09-21
    相关资源
    最近更新 更多