我使用CSS样式在我的网站上的输入按钮,但在IOS设备上的样式被Mac的默认按钮所取代。是否有一种方法可以为iOS设置按钮样式,或者有一种方法可以让一个超链接表现得像一个提交按钮?
当前回答
请添加此css代码
input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
其他回答
使用下面的css
输入(type =“提交”){ 字体大小:20 px; 背景:粉色; 边界:没有; 填充:10px 20px; } .flat-btn { -webkit-appearance:没有;/ * * /铬 - Mozilla -appearance: none 外观:无; border - radius: 0; } h2 { Margin: 25px 0 10px; 字体大小:20 px; } <h2>iOS样式按钮!< / h2 > <input type="submit" value="iOS样式按钮!"/> <h2>不再有风格!按钮!< / h2 > <input class="flat-btn" type="submit" value="No More Style! "按钮!”/>
请添加此css代码
input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
-webkit-appearance:没有;
注意:使用引导样式按钮。它常用来表示响应。
我自己最近也遇到了这个问题。
<!--Instead of using input-->
<input type="submit"/>
<!--Use button-->
<button type="submit">
<!--You can then attach your custom CSS to the button-->
希望这能有所帮助。
你可能正在寻找
-webkit-appearance: none;
Safari CSS注释-webkit-appearance Mozilla Developer Network的-moz-appearance