开发者

decimal numbers for padding and margin

开发者 https://www.devze.com 2023-04-08 15:18 出处:网络
Can I use decimal numbers (18.9 o开发者_如何学Pythonr 75.5) for padding, margin or other styles? all browsers (such as IE5, IE6) support it?

Can I use decimal numbers (18.9 o开发者_如何学Pythonr 75.5) for padding, margin or other styles? all browsers (such as IE5, IE6) support it?

Thanks.


As long as it's an EM measurement, I don't see why not. Not sure about IE5, but I'm pretty sure IE6 is supported for decimals. Any browser that supports EM.


Yes, they apply anywhere for measurements. They don't make a lot of sense if you're positioning something and using partial pixel measurements, but otherwise they're perfectly acceptable. Just remembe to specify the units. e.g.

height: 57; /* no units, will be treated as an error */
height: 57px; /* perfectly fine */
0

精彩评论

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