CSS border-width:1px不给我同样细边框 [英] CSS border-width:1px doesn't give me equally thin borders

查看:460
本文介绍了CSS border-width:1px不给我同样细边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试向 div 添加细边框。我的CSS是这样:

I am trying add thin borders to a div. My CSS is like this:

border: solid;
border-width: 1px;

然而,结果边框在我的浏览器中看起来并不那么薄。如下图所示,左侧和底部的边框比右侧和顶部的边框厚。

Yet the result borders don't look equally thin in my browser. As you can see below, the borders on the left and bottom look thicker than the borders on the right and top.

我想让边框变得同样薄。我已经尝试添加

I want to make the borders equally thin. I have tried to add

shape-rendering: crispEdges;

但它不改变外观。 JS Fiddle示例

我试过这个在我的Chrome版本41.0.2272.101 m - 它看起来不错。我也试过这个在IE - 它看起来不错。所以我知道这不是我的显示器...

I tried this in my Chrome Version 41.0.2272.101 m -- it looks bad. I've also tried this in IE -- it looks fine. So I know it's not my monitor...

推荐答案

您的显示器设置为非本机分辨率。 (Windows 8)右键单击桌面,单击屏幕分辨率,然后选择建议的分辨率。

Your monitor is set to a non-native resolution. (Windows 8) Right click on your desktop, click "Screen Resolution" and then select the recommended resolution.

这篇关于CSS border-width:1px不给我同样细边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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