使用边框半径为 20 像素的背景图像时,表单按钮上的轮廓模糊
由于某种原因,仅在 Windows 计算机上,在此页面上的“登录”按钮上,我得到了这个奇怪的模糊轮廓,很难解释,所以请亲自查看:
http://zis.smartlyedu.com/login
它不会出现在 Mac OS 上,但会出现在 Windows 上。
以前有人遇到过这种情况吗?
这是按钮的 CSS:
div.input-submit input{
outline:none;
font-family:Helvetica, Arial, sans-serif;
width:100px;
height:35px;
color:#fff;
font-weight:normal;
float:right;
font-size:18px;
text-shadow:#000 1px 1px 1px;
border:1px solid #fff;
-moz-border-radius:20px;
-webkit-border-radius:20px;
-o-border-radius:20px;
-ms-border-radius:20px;
-khtml-border-radius:20px;
border-radius:20px;
background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0)), color-stop(100%, rgba(0,0,0,0.2)));
background:-webkit-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:-moz-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:-o-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:-ms-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2));
background-color:#31639d;
font-weight:bold;
border:1px solid #fff
}
For some reason, exclusively on Windows machines, on the Sign in button on this page, I'm getting this odd fuzzy outline that's difficult to explain, so see for yourself:
http://zis.smartlyedu.com/login
It doesn't appear on Mac OS, but it does on Windows.
Has anyone encountered this before?
Here is the CSS for the button:
div.input-submit input{
outline:none;
font-family:Helvetica, Arial, sans-serif;
width:100px;
height:35px;
color:#fff;
font-weight:normal;
float:right;
font-size:18px;
text-shadow:#000 1px 1px 1px;
border:1px solid #fff;
-moz-border-radius:20px;
-webkit-border-radius:20px;
-o-border-radius:20px;
-ms-border-radius:20px;
-khtml-border-radius:20px;
border-radius:20px;
background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0)), color-stop(100%, rgba(0,0,0,0.2)));
background:-webkit-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:-moz-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:-o-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:-ms-linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.2));
background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2));
background-color:#31639d;
font-weight:bold;
border:1px solid #fff
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个解决方案是通过原始帖子的评论找到的。
Alain,将 display:none 添加到输入元素以确认轮廓源自输入元素。如果您确定来源的原因,请禁用与您的元素匹配的选择器的所有 CSS 属性,然后将它们单独添加回来。这样,您将能够找到 CSS 问题的原因。
Jason McCreary 回复:
This solution has been found through comments at the original post.
Alain, add display:none to the input element to confirm that the outline is originating from the input element. If you're sure about the origin's cause, disable all CSS attributes of the selectors which match your element, and add them back individually. This way, you will be able to find the cause of your CSS issue.
Jason McCreary responded: