0

我创建了一个简单的页面并在 BlackBerry 设备上尝试,但突出显示不起作用,有人可以帮我看看我的代码有什么问题吗?

<!DOCTYPE HTML>

<html>
    <head>
    <title>Test Page</title>
    <style>
        .list {
            width: 100%;
            display: block;
            text-decoration: none;
            border-style: solid;
            border-color: #CCC;
            border-width: 1px;
            margin-top: 5px;
            padding: 2px;
        }

        .list:hover {
            background-color: green;
            color: white;
        }
    </style>
    </head>


    <body>
        <div class="list" x-blackberry-initialFocus="true" x-blackberry-focusable="true">List 1</div>
        <div class="list" x-blackberry-focusable="true">List 2</div>
        <div class="list" x-blackberry-focusable="true">List 3</div>
        <div class="list" x-blackberry-focusable="true">List 4</div>
        <div class="list" x-blackberry-focusable="true">List 5</div>
        <div class="list" x-blackberry-focusable="true">List 6</div>
    </body>
</html>

谢谢你。

4

1 回答 1

0

您的 HTML 文件看起来正确。可能是您没有从 config.xml 文件启用焦点模式导航。确保您在 config.xml 中设置了<rim:navigation mode="focus" />元素,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns:rim="http://www.blackberry.com/ns/widgets" 
    version="1.0.1" xmlns="http://www.w3.org/ns/widgets">
    <name>Focus demo</name>

    <content src="index.htm" />
    <feature id="blackberry.system" />
    <rim:navigation mode="focus" />

</widget>
于 2012-08-20T17:02:54.550 回答