css 苹果手机按钮默认样式如何去掉

html-css012

css 苹果手机按钮默认样式如何去掉,第1张

只要在样式里面加一句去掉css去掉iPhone、iPad的默认按钮样式就可以了。 (不要写在class里哦)

input[type="button"], input[type="submit"], input[type="reset"] {-webkit-appearance: none}

textarea {  -webkit-appearance: none}

如果还有圆角的问题,

.button{ border-radius: 0 }

1、去除Chrome等浏览器文本框默认发光边框

input:focus, textarea:focus {outline: none}

去掉高光样式:

input:focus{

-webkit-tap-highlight-color:rgba(0,0,0,0)

-webkit-user-modify:read-write-plaintext-only}

当然这样以来,当文本框载入焦点时,所有浏览器下的文本框的边框都不会有颜色上及样式上的变化了,这样的话,当文本框载入焦点时,边框颜色就会变为橙色,给用户一个反馈。

2、去除IE10+浏览器文本框后面的小叉叉,只需下面一句就ok了

input::-ms-clear {display: none}

CSS去掉div的边框可以去掉css的border属性,或者覆盖border属性为none来实现。

1、如图,这是一个带边框的div测是页面。

2、第一个div的边框是这行css实现的效果

border: 5px solid black

3、第二个div没有设置边框样式

4、第三个div的css设置了边框样式,但被内联样式覆盖为none,因此也能不显示边框。

代码如下

<div class="box1"></div>

<div class="box2"></div>

<div class="box3" style="border: none"></div>

div{

width:200px

height:120px

margin-bottom:10px

background-color:yellow

}

.box1, .box3{

border: 5px solid black

}