私はタッチモニターとhtmlページ(MS Windows 7 Pro Eng、IE8)を使用します。そして、私は、タッチエリアがli
タグのテキストエリアがタップされ、残りが無視されるときに触れることを発見しました。それはそうしても変更はどのようliタグのタッチイベントなし
は、Liの白/非テキスト領域上のユーザタップ、それが必要として起動します。
<link href="css/bootstrap.min.css" rel="stylesheet" />
<script src="jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="jquery.mobile-1.4.5.min.js" type="text/javascript"></script>
<ul class="nav" id="mainList">
<li class="touchedLi stripe-even" id="item0"><a href="#">Club Yellow 1</a></li>
<li class="touchedLi stripe-odd" id="item1"><a href="#">Club Yellow 2</a></li>
<li class="touchedLi stripe-even" id="item2"><a href="#">Club Yellow 3</a></li>
</ul>
CSS
li.stripe-even {
background-color: #FFF1ED;
list-style-type: none;
}
li.stripe-odd{
background-color: #F2FFED;
list-style-type:none;
}
ul.mainList li:hover{
background-color: yellow;
}
#mainList a:active {
color: white;
background-color: orange;
}
#mainList>li>a {
display: block;
}
li.stripe-even {
background-color: #FFF1ED;
list-style-type: none;
}
li.stripe-odd{
background-color: #F2FFED;
list-style-type:none;
}
ul.mainList li:hover{
background-color: yellow;
}
#mainList a:active {
\t color: white;
background-color: orange;
}
#mainList>li>a {
display: block;
}
#mainList>li {
display: block;
}
#mainList>li {
display: block;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<ul class="nav" id="mainList">
<li class="touchedLi stripe-even" id="item0"><a href="#">Club Yellow 1</a></li>
<li class="touchedLi stripe-odd" id="item1"><a href="#">Club Yellow 2</a></li>
<li class="touchedLi stripe-even" id="item2"><a href="#">Club Yellow 3</a></li>
</ul>
ブラウザとOSが期待どおりに動作しないか、それともすべてのOSで動作しているかを教えてください。 –
@GCyrillus最新の質問をご覧ください。 –
Dimi、問題の[mcve]を作成します。 CSSが適用されていることが分かっていない限り、私たちは手助けできません。それでは、sinppet/codeツールを使って、またはjsFiddle/codepenなどを作成してください。 –