解決JQeury顯示內(nèi)容沒有邊距內(nèi)容緊挨著瀏覽器邊線
更新時間:2013年12月20日 14:49:56 作者:
JQuery頁面顯示的內(nèi)容沒有邊距,內(nèi)容緊挨著瀏覽器邊線,下面有個不錯的解決方法,大家可以嘗試下
寫的JQuery頁面顯示的內(nèi)容沒有邊距,內(nèi)容緊挨著瀏覽器邊線,特別難看(如下圖)
代碼如下:
<body>
<form id="form1" runat="server">
<div data-role="page" id="page">
<div data-role="header" data-theme="b">
<h2>新聞內(nèi)容</h2>
</div>
<div>
<div>
<asp:Image ID="newsImage" runat="server" AlternateText="新聞圖片" />
</div>
<div>
<asp:Label ID="lblDetail" runat="server" Text="Label"></asp:Label>
</div>
</div>
<div data-role="footer" data-theme="d">
<h4>餐飲咨詢</h4>
</div>
</div>
</form>
</body>
其實原因特別簡單,就是顯示的內(nèi)容沒有放在content里邊,所以在div里加一個data-role="content"就可以了,修改后的代碼如下:
<body>
<form id="form1" runat="server">
<div data-role="page" id="page">
<div data-role="header" data-theme="b">
<h2>新聞內(nèi)容</h2>
</div>
<div>
<div>
<asp:Image ID="newsImage" runat="server" AlternateText="新聞圖片" />
</div>
<div>
<asp:Label ID="lblDetail" runat="server" Text="Label"></asp:Label>
</div>
</div>
<div data-role="footer" data-theme="d">
<h4>餐飲咨詢</h4>
</div>
</div>
</form>
</body>

代碼如下:
復(fù)制代碼 代碼如下:
<body>
<form id="form1" runat="server">
<div data-role="page" id="page">
<div data-role="header" data-theme="b">
<h2>新聞內(nèi)容</h2>
</div>
<div>
<div>
<asp:Image ID="newsImage" runat="server" AlternateText="新聞圖片" />
</div>
<div>
<asp:Label ID="lblDetail" runat="server" Text="Label"></asp:Label>
</div>
</div>
<div data-role="footer" data-theme="d">
<h4>餐飲咨詢</h4>
</div>
</div>
</form>
</body>
其實原因特別簡單,就是顯示的內(nèi)容沒有放在content里邊,所以在div里加一個data-role="content"就可以了,修改后的代碼如下:
復(fù)制代碼 代碼如下:
<body>
<form id="form1" runat="server">
<div data-role="page" id="page">
<div data-role="header" data-theme="b">
<h2>新聞內(nèi)容</h2>
</div>
<div>
<div>
<asp:Image ID="newsImage" runat="server" AlternateText="新聞圖片" />
</div>
<div>
<asp:Label ID="lblDetail" runat="server" Text="Label"></asp:Label>
</div>
</div>
<div data-role="footer" data-theme="d">
<h4>餐飲咨詢</h4>
</div>
</div>
</form>
</body>
相關(guān)文章
jquery實現(xiàn)html頁面先加載內(nèi)容過幾秒后顯示數(shù)據(jù)
這篇文章主要給大家介紹了關(guān)于jquery實現(xiàn)html頁面先加載內(nèi)容過幾秒后顯示數(shù)據(jù)的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家具有一定的參考借鑒價值,需要的朋友可以參考下2023-07-07jQuery Ajax 實例代碼 ($.ajax、$.post、$.get)
下面小編就為大家?guī)硪黄猨Query Ajax 實例代碼 ($.ajax、$.post、$.get)。小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考2016-04-04基于jQuery實現(xiàn)鼠標(biāo)點擊導(dǎo)航菜單水波動畫效果附源碼下載
這篇文章主要介紹了基于jQuery實現(xiàn)鼠標(biāo)點擊導(dǎo)航菜單水波動畫效果附源碼下載,需要的朋友參考下2016-01-01jquery實現(xiàn)將獲取的顏色值轉(zhuǎn)換為十六進制形式的方法
這篇文章主要介紹了jquery實現(xiàn)將獲取的顏色值轉(zhuǎn)換為十六進制形式的方法,包含了完整的實例與關(guān)鍵代碼的注釋說明,并附帶了所需知識點的參考文章地址,具有一定的參考借鑒價值,需要的朋友可以參考下2014-12-12使用jQuery mobile NuGet讓你的網(wǎng)站在移動設(shè)備上同樣精彩
這篇文章主要介紹了使用jQuery mobile NuGet讓你的網(wǎng)站在移動設(shè)備上同樣精彩,使用jQuery mobile NuGet包,改變共享的布局和視圖,并使你的網(wǎng)站在傳統(tǒng)的瀏覽器和大部分手機展現(xiàn)的都很好。,需要的朋友可以參考下2019-06-06jquery實現(xiàn)鼠標(biāo)滑過顯示提示框的方法
這篇文章主要介紹了jquery實現(xiàn)鼠標(biāo)滑過顯示提示框的方法,以兩個不同實例形式分析了jQuery鼠標(biāo)滑過顯示提示框的實現(xiàn)技巧與功能代碼,非常具有實用價值,需要的朋友可以參考下2015-02-02