CSS3:是否可以在数字中使用千位分隔符? [英] CSS3: Is it possible to have thousands separator in numbers?

查看:63
本文介绍了CSS3:是否可以在数字中使用千位分隔符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
使用 CSS 格式化数字(小数位、千位分隔符等)

我正在开发一个用于统计的网络应用程序(LAMP 平台),我想知道 CSS3 是否可以处理数以千计的分隔.

I'm working on a web application for statistics (LAMP platform), and I was wondering if CSS3 could take care of thousands separation in numbers.

例如,我想要这样的文字

For example, I would like that a writing just like

Items sold: 101715

可能看起来像

Items sold: 101 715

所以用空格作为千​​位分隔符.

So with a space as a thousands separator.

我知道我可以用 PHP 来实现它,而且对于像 CSS3 这样的东西,这与相关内容的语义评估有关,但我开始怀疑这是否可行.

I know I can have it with PHP, and also that for something like CSS3 this has to do with semantic evaluation of related content, but I started wondering if this could be possible.

有人吗?

推荐答案

没有 CSS cant format numbers,如果你想在客户端做类似的事情,你必须研究一下 javascript.

No CSS cant format numbers, if you would like to do something like that in the client, you would have to look into javascript.

这篇关于CSS3:是否可以在数字中使用千位分隔符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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