[英]iOS html5 css3 button click style
I write my application on HTML5/CSS3/JavaScript. 我在HTML5 / CSS3 / JavaScript上编写应用程序。 For my button I create style (all work fine in browser), but when I start my application on iPad my active effect override standart iOS click effect.
对于我的按钮我创建样式(所有工作都在浏览器中工作正常),但是当我在iPad上启动我的应用程序时,我的主动效果覆盖了标准的iOS点击效果。 How I can override this standart effect?
我如何能够超越这种标准效果?
My style : 我的风格 :
<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' );
}
My Button: 我的按钮:
<a href="#" class="button"></a>
The answer to your problem I believe is very simple. 我相信你的问题的答案非常简单。
Add this following CSS code to your button or body tag (to affect the entire document). 将以下CSS代码添加到按钮或正文标记中(以影响整个文档)。
body { -webkit-appearance: none; }
This will remove default styles for buttons that iOS places onto certain UI elements. 这将删除iOS放置到某些UI元素的按钮的默认样式。
Hope that helps. 希望有所帮助。
我有同样的问题使用按钮标签,它似乎覆盖。
<button class="button"><a href="#go">Link</a></button>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.