HTML:子像素边框 [英] HTML: Sub-pixel border

查看:165
本文介绍了HTML:子像素边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以有一个比1px更薄的边框,并且可以在IE6 +中使用,而不是一个图像,并且可以直观地进行渲染?

谢谢。

解决方案

我想你可以使用像 em 这样的单位来定义边框的宽度,会出现不到1px,并且这将是有效的。然而,就像Will Martin所说的那样,出于显示的目的,它可能会将它整体上或下降到整个像素。


Is it possible to have a border that is thinner than 1px and works in IE6+ and is not an image and renders properly visually?

Thank you.

解决方案

I think you could define the width of a border using units like em which would come out to less than 1px, and it would be valid. However, like Will Martin said, for display purposes it would just round it up or down to a whole pixel.

这篇关于HTML:子像素边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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