0

我使用 Jquery mobile 创建了标题和内容部分。在标题中,我添加了一个大于标题高度的图标(如图所示)。所以问题是..以下内容应该在图标下方(从左侧开始)。为什么位置不在左侧图标下方?图标从标题到内容部分应该重叠。

http://s1.directupload.net/file/d/3233/citi5s8r_jpg.htm “图片”

.....
<div data-role="page">
    <div data-role="header">
    <img src="test.gif" style="float:left;" height="75px";/>
    <h1>Testpage</h1>
    <a href="Start.html" rel="external" class="ui-btn-right" data-role="button" data-icon="home" data-iconpos="notext">Home</a>
    </div>

    <div data-role="content">
        <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
                <li data-role="list-divider" class="middle">Topic 1</li>
                <li>
                    <p class="middle">Mittwoch, 20.04.2013 - 15:00 Uhr</p>

                    <p class="middle" style="margin-top:5px; background-color:transparent;">Stuttgart</p>
                </li>
        </ul>
    </div>
......
</div>
......
4

1 回答 1

1

Why don´t you just add a new div or whatever to <div data-role="header"> with height and width and background-image or <img> inside of your overlapping icon and set css like:

#funkyIcon {
position:absolute;
top:0;
left:0;
z-index:2; ? or two million
}

this should to it

于 2013-04-22T17:53:40.607 回答