黑莓滚动问题

时间:2012-06-04 14:30:14

标签: html html5 blackberry blackberry-webworks

我为Blackberry创建了一个HTML页面。我已经做得很好但是无法使用触控板滚动任何分区。

我正在用Blackberry粗体测试这个。

这是我的代码:

<!DOCTYPE HTML>
<html>
<head>
<meta name="HandheldFriendly" content="True" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width,height=device-height,target-  densitydpi=device-dpi,user-scalable=no,initial-scale=1.0">
<title>XXXX</title>
</head>
<body class="Claimtype">
<div class="mainwrapper">
<header>
<h1>Claim Type<span></span></h1>
</header>
<article>
<div class="claimtype_content">
  <div class="claim_summary">
    <h3>
      <label>Plan No:</label>
      183245</h3>
    <h4>Health Spending account</h4>
    <h4>Health Spending account</h4>
  </div>
  <div class="claim_type_selection">
    <h3>Type of Claim</h3>
    <select name="claim_type_selection">
      <option>Select</option>
      <option>Select2</option>
      <option>Select3</option>
      <option>Select4</option>
      <option>Select5</option>
    </select>
    <div class="claimtype_desc">
        <div class="claimdescimg">
            <img src="inputUser.png" width="50" height="50">
        </div>
      <div class="claimtype_desctxt">
      <h3>Dental</h3>
          <p>The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation. The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation. The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation.</p>
      </div>
    </div>
  </div>
</div>
</article>
</div>
</body>
</html>

在这里,我想滚动“claimtype_desctxt”文本,我还添加了溢出样式。

有人可以提供帮助吗?

1 个答案:

答案 0 :(得分:0)

这里总结了你需要知道的一切:

Using focus-based navigation

1st-在配置文件中指定导航模式:

<widget>
    <rim:navigation mode=�focus�/>
    <feature id="blackberry.ui.dialog" />
</widget>

第二 - 定义可聚焦元素,这是示例:

<img id="image1" src="imageb.png" x-blackberry-focusable="true" />

您还可以定义初始焦点:

<a class="list" x-blackberry-initialFocus="true">First element</a>

这是带有javascript函数的完整示例代码,它可以更改焦点对象的高亮样式:

<html>
<head>

   <title>Color Input Type</title>
   <script type="text/javascript">
      function highlight(e) {
         e.setAttribute("style", "background-color: red; outline: cyan solid thick;");
      }

      function unhighlight(e) {
         e.setAttribute("style", "");
      }
   </script>
</head>

<body>    
   <h2>Test input type - text/password/email/search/tel/number</h2>
      <div>
         <label >Text: </label>
         <input type="text" x-blackberry-focusable="true" onmouseover="highlight(this);" 
            onmouseout="unhighlight(this);" />
      </div>
      <div>
         <label>Number: </label>
         <input type="number" x-blackberry-focusable="true" onmouseover="highlight(this);" 
            onmouseout="unhighlight(this);" />
      </div>
</body>
</html>

我希望这会有所帮助