解決JQeury顯示內(nèi)容沒有邊距內(nèi)容緊挨著瀏覽器邊線
更新時(shí)間:2013年12月20日 14:49:56 作者:
JQuery頁面顯示的內(nèi)容沒有邊距,內(nèi)容緊挨著瀏覽器邊線,下面有個(gè)不錯的解決方法,大家可以嘗試下
寫的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>
其實(shí)原因特別簡單,就是顯示的內(nèi)容沒有放在content里邊,所以在div里加一個(gè)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>
其實(shí)原因特別簡單,就是顯示的內(nèi)容沒有放在content里邊,所以在div里加一個(gè)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)文章
Easyui 關(guān)閉jquery-easui tab標(biāo)簽頁前觸發(fā)事件的解決方法
這篇文章主要介紹了Easyui 關(guān)閉jquery-easui tab標(biāo)簽頁前觸發(fā)事件 ,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-04-04
使用jQuery獲取radio/checkbox組的值的代碼收集
很久沒有寫JQuery的文章了。今天來看下JQ對天Checkbox復(fù)選框的操作。看下面的一個(gè)小例子。在這個(gè)例子中包括了以下幾個(gè)功能2009-12-12
Jquery動態(tài)替換div內(nèi)容及動態(tài)展示的方法
這篇文章主要介紹了Jquery動態(tài)替換div內(nèi)容及動態(tài)展示的方法,動態(tài)替換div內(nèi)容并展示的使用技巧與注意事項(xiàng),需要的朋友可以參考下2015-01-01
使用jQuery時(shí)Form表單元素ID和name命名大忌
將自己的表單元素ID和name命名為了nodeName,在chrome瀏覽器下報(bào)錯,結(jié)果發(fā)現(xiàn)是表單元素命名的原因2014-03-03
JS實(shí)現(xiàn)復(fù)制內(nèi)容到剪貼板功能兼容所有瀏覽器(推薦)
這篇文章主要介紹了JS實(shí)現(xiàn)復(fù)制內(nèi)容到剪貼板功能兼容所有瀏覽器(推薦)的相關(guān)資料,非常不錯,具有參考借鑒價(jià)值,需要的朋友可以參考下2016-06-06

