如何删除外框从输入按钮 [英] How To Remove Outline Border From Input Button

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

问题描述

在点击其他地方的边界消失了,试过的onfocus没有,但没有帮助,如何让丑陋的按钮边框消失的时候点击?

~~~~

 < HEAD>
<风格>
输入[类型=文本]
{
宽度:150像素;
显示:块;
保证金底:10px的;
背景色:黄色;
}
输入[类型=按钮]
{宽度:120像素;高度:60像素;
保证金左:35px;
显示:块;
背景颜色:灰色;
颜色:白色;
边界:无;}
< /风格>
< /头>
<身体GT;<表格名称=输入行动=方法=获取>
姓:<输入类型=文本名称=名称值=彼得大小=20>
名字:<输入类型=文本名称=名称值=格里芬大小=20>
<输入类型=按钮值=示例按钮>< /表及GT;
< /身体GT;
< / HTML>


解决方案

 <风格>
输入[类型=按钮]
{
    宽度:120像素;
    高度:60像素;
    保证金左:35px;
    显示:块;
    背景颜色:灰色;
    颜色:白色;
    边界:无;
    概述:无;
}
< /风格>

使用大纲

:无;我们可以去除边框镀铬

试试这个

when click somewhere else the border disappears, tried onfocus none, but didn't help, how to make ugly button border disappear when click on?

~~~~

<head>
<style>
input[type="text"]
{
width:150px;
display:block;
margin-bottom:10px;
background-color:yellow;
}
input[type="button"]
{

width:120px;

height:60px;
margin-left:35px;
display:block;
background-color:gray;
color:white;
border: none;

}
</style>
</head>
<body>

<form name="input" action="" method="get">
Firstname:<input type="text" name="Name" value="Peter" size="20">
Lastname:<input type="text" name="Name" value="Griffin" size="20">
<input type="button" value="Example Button">

</form>
</body>
</html>

解决方案

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

using outline:none; we can remove that border in chrome

try this

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

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