[英]iOS html5 css3 button click style
我在HTML5 / CSS3 / JavaScript上編寫應用程序。 對於我的按鈕我創建樣式(所有工作都在瀏覽器中工作正常),但是當我在iPad上啟動我的應用程序時,我的主動效果覆蓋了標准的iOS點擊效果。 我如何能夠超越這種標准效果?
我的風格 :
<style type="text/css">
.button {
display: inline-block;
width: 150px;
height: 50px;
background: #f78d1d;
background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
background: -moz-linear-gradient(top, #faa51a, #f47a20);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
}
.button:ACTIVE {
background: #f47c20;
background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015) );
background: -moz-linear-gradient(top, #f88e11, #f06015);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015' );
}
我的按鈕:
<a href="#" class="button"></a>
我相信你的問題的答案非常簡單。
將以下CSS代碼添加到按鈕或正文標記中(以影響整個文檔)。
body { -webkit-appearance: none; }
這將刪除iOS放置到某些UI元素的按鈕的默認樣式。
希望有所幫助。
我有同樣的問題使用按鈕標簽,它似乎覆蓋。
<button class="button"><a href="#go">Link</a></button>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.