0
我在我的jQuery-Mobile
Listview
中更改listitem
中的一個特定background-color
時出現了一些問題。更改jQuery-Mobile中的listview顏色1.4.5
每個listitem
都有自己的ID。 我想改變一個。
請幫我:)
我在我的jQuery-Mobile
Listview
中更改listitem
中的一個特定background-color
時出現了一些問題。更改jQuery-Mobile中的listview顏色1.4.5
每個listitem
都有自己的ID。 我想改變一個。
請幫我:)
這是一個可能的方式做到這一點:
#item-2 .ui-btn {
background-color: aliceblue !important;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link href="https://fonts.googleapis.com/css?family=Jura" rel="stylesheet">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.css">
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page" id="page-one">
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">Friday, October 8, 2010 <span class="ui-li-count">2</span></li>
<li id="item-1">
<a href="index.html">
<h2>Stephen Weber</h2>
<p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
<p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
<p class="ui-li-aside"><strong>6:24</strong>PM</p>
</a>
</li>
<li id="item-2">
<a href="index.html">
<h2>jQuery Team</h2>
<p><strong>Boston Conference Planning</strong></p>
<p>In preparation for the upcoming conference in Boston, we need to start gathering a list of sponsors and speakers.</p>
<p class="ui-li-aside"><strong>9:18</strong>AM</p>
</a>
</li>
<li data-role="list-divider">Thursday, October 7, 2010 <span class="ui-li-count">1</span></li>
<li id="item-3">
<a href="index.html">
<h2>Avery Walker</h2>
<p><strong>Re: Dinner Tonight</strong></p>
<p>Sure, let's plan on meeting at Highland Kitchen at 8:00 tonight. Can't wait!</p>
<p class="ui-li-aside"><strong>4:48</strong>PM</p>
</a>
</li>
</ul>
</div>
</div>
</body>
</html>
歡迎堆棧溢出 - 有你真好。請閱讀我如何提出一個好問題? https://stackoverflow.com/help/how-to-ask以及如何創建一個最小化,完整和可驗證的示例,以幫助將堆棧溢出內容保持在最高級別,並增加獲得正確答案的機會。 https://stackoverflow.com/help/mcve – 2017-10-20 14:10:23