我在更改background-color
listitem
中某个特定jQuery-Mobile
的{{1}}时遇到了一些问题。
每个Listview
都拥有自己的ID。
我想换一个。
请帮帮我:)。
答案 0 :(得分:0)
这是一种可能的方法:
#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>
&#13;