如何从输入按钮中删除轮廓边框 [英] How to remove outline border from input button

查看:31
本文介绍了如何从输入按钮中删除轮廓边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击其他地方边框消失时,我尝试使用 onfocus: none,但这没有帮助.当我点击它时,如何让这个丑陋的按钮边框消失?

When I click somewhere else the border disappears, I tried to use onfocus: none, but that didn't help. How to make this ugly button border disappear when I click on it?

input[type=button] {
  width: 120px;
  height: 60px;
  margin-left: 35px;
  display: block;
  background-color: gray;
  color: white;
  border: none;
}

<input type="button" value="Example Button">

推荐答案

使用 outline: none; 你可以在 chrome 中移除那个边框.

Using outline: none; you can remove that border in chrome.

<style>
input[type=button] {
    width: 120px;
    height: 60px;
    margin-left: 35px;
    display: block;
    background-color: gray;
    color: white;
    border: none;
    outline: none;
}
</style>

这篇关于如何从输入按钮中删除轮廓边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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