无法删除jquery mobile中输入字段的样式 [英] Cannot remove the styling of the input field in jquery mobile

查看:111
本文介绍了无法删除jquery mobile中输入字段的样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML

 我的名字是
< input type =text class =amountBoxvalue =samreadonly />

CSS:

  .amountBox [readonly] {
-webkit-box-shadow:none; / * {b-active-background-color} * /
-moz-box-shadow:none; / * {b-active-background-color} * /
box-shadow:none; / * {b-active-background-color} * /
-webkit-appearance:none;
}

我不能删除它周围的东西,无论是边框或阴影,

演示: http://jsfiddle.net/B2qfL/5/rel =nofollow> http://jsfiddle.net/B2qfL/5/

解决方案

data-role =none属性添加到不想由JQM设置样式的元素。

 < input type = text data-role = none /> 


HTML:

My name is
<input type="text" class="amountBox" value="sam" readonly />

CSS:

.amountBox[readonly] {
    -webkit-box-shadow: none; /*{b-active-background-color}*/
       -moz-box-shadow: none; /*{b-active-background-color}*/
            box-shadow: none; /*{b-active-background-color}*/
    -webkit-appearance: none;
}

i cannot remove whats around it, be it the border or shadow,i cant remove it.I dont want any styling..But no way i can achieve it.any help?

Demo: http://jsfiddle.net/B2qfL/5/

解决方案

Add data-role="none" attribute to elements you don't want to be styled by JQM.

<input type=text data-role=none />

这篇关于无法删除jquery mobile中输入字段的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆