Jquery移动浮动:左问题,标题图标块页面的左侧

Jquery mobile float:left issue, header-icon blocks the left side of the page

本文关键字:图标 标题 移动 问题 Jquery      更新时间:2023-09-26

我用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>
......

你为什么不给<div data-role="header">添加一个新的div或者其他东西,在你的重叠图标内设置高度和宽度和背景图像或者<img>,并设置css:

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