请在这里查看示例 ☞ borderRadius示例
问题重现
在ios端,我们不想使用按钮或输入框自带的圆角样式,改如何取消呢?
问题解决
- -webkit-appearance : none ;/解决ios上按钮的圆角问题/
- border-radius: 0;/解决ios上输入框圆角问题/
- ios端示例截屏如下:
示例源码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>demo</title>
<style>
* {
margin: 0;
padding: 0;
}
body, html {
width: 100%;
height: 100%;
}
button, input {
width: 90%;
margin: 0 auto;
display: block;
box-sizing: border-box;
height: 50px;
line-height: 50px;
}
.bBtn {
-webkit-appearance : none ;/*解决ios上按钮的圆角问题*/
}
.bInput {
border-radius: 0;/*解决ios上输入框圆角问题*/
}
</style>
</head>
<body>
<button class="aBtn">ios这个按钮有圆角</button>
<button class="bBtn">ios这个按钮没有圆角</button>
<input class="aInput" type="text" placeholder="ios这个输入框有圆角"/>
<input class="bInput" type="text" placeholder="ios这个输入框没有圆角"/>
</body>
</html>