开发者

can an element have a a decimal height in html/css?

I am working on a site, when I look at it with firebug in firefox various elements seem to have heights like 133.8 pi开发者_如何学Cxels, whereas firebug lite in chrome reports the height as 133px for the same method. Is this a difference in the browser rendering, or is it just a curiousity brought on by firebug? I thought pixels had to be measured in integers...


Funny thing. I just tried today and booth Chrome 25 and Firefox 19 seemed to support it, and I even used inline img width and height:

<img src="something" width="39" height="21.5" />

I had a series of tiles with absolute positioning connected to form a diagonal line, and I know it worked because the line was wavy and I had to use the .5 to make it straight.


You can have decimal values in units other than px. Like em, in, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜